Click to See Complete Forum and Search --> : Tables or Divs?


CreativeCozza
02-19-2007, 12:24 PM
Hello

I create websites with HTML, and use CSS for presentation where I can. I have just learnt HTML, therefore used Tables to layout.

But I have noticed almost all websites use divs. I have never used divs before, but I have noticed that you can layer them.

CSS is used to enhance websites, not rely on it, but divs are CSS, right? This would affect accessibility uses, right?

Please can you give me advice, and possibly website tutorials?

Thank you,
Cara

aswebdesign
02-19-2007, 12:37 PM
Check out www.westciv.com for lots of info and useful CSS tutorials!

felgall
02-19-2007, 12:50 PM
Use a table to display tabular data.

Use a div when you need to define divisions within your content.

Don't use either of them at any other time. Just attach the styles to the correct markup for whatever the elements of your page actually are.

CreativeCozza
02-19-2007, 01:51 PM
So, if I need to split up a TD cell, I use divs in it?

toicontien
02-19-2007, 03:31 PM
If you need to split up a TD cell that contains tabular data, it either isn't tabular data and you need to be using all DIVs, or you can use the colspan attribute to adjust how many columns a cell will span. Do you have a specific example in mind? We're kind of speaking in generalities at this point, so it's hard to really answer your question.

ray326
02-19-2007, 03:31 PM
So, if I need to split up a TD cell, I use divs in it?What kind of tabular data requires that sort of presentation?

drhowarddrfine
02-19-2007, 03:43 PM
<div>s are NOT css. They are html.