So I have a Computer Science (Web Design) final this afternoon... and I can't come up with a good answer to a question that is sure to be on the final. I know that this sounds incredibly stupid, but here is what I'm having trouble with:
Tables vs. DIVs for page structure.
Okay, so I know what this means and I understand how to explain it. What I really need to get a grasp on is whether or not DIVs are useful when using relative posititioning values rather than absolute values (ex: positining them with pixels). My professor is ALL ABOUT using relative size values in page design, so I need to have a strong answer for this. Pretty basic stuff, I know... but I'm unfamiliar with DIV design and the pros and cons.
Ugh. After this final I have to write a huge "take home" final essay as part of my history final in the morning. Now excuse me while I go shoot myself in the face.
ID:12138
![]() May 8 2006, 9:40 am
|
|
I tend to have to relearn bits of CSS like this each time I get into it. I don't know of any reason DIVs wouldn't work fine with either positioning model, but unfortunately it's the kind of thing I just tweak with when it comes up, and I don't have a solid answer off the top of my head...
|
Heh, you spelled positioning wrong twice.
If you haven't already, find a site like HTML Dog and read the section explaining about <div> and how it's used, what it's mainly used for, what it's good and bad for, etc. |
Deadron:
I tend to have to relearn bits of CSS like this each time I get into it. I'm exactly the same way; I look up information on this sort of thing when I need to use it, but sometimes it doesn't stick. Thanks for the help guys! That short description you gave helps a lot Scoobert; I have a better idea now of what I'm going to say on the test. |
I am not sure if that is sarcasm or not, because my discriptions didn't discribe much, but I guess they could be used as talking points. Like I said, I really don't know much about DIVs, or CSS for that matter. Enough to edit what is already there, but not enough to make a good site out of them. As for realtive-v-fixed, It strongly depends on the case. Some things require a certain size, or look best in unform, but others need to be realtive to resolution so that 640x400 and 1200x1000 have the same experience. Fixed size means that Big and small resolutions might have quality loss, while realitive might cause problems with what you are trying to convey in the theme of the page.
|
It's not sarcasm at all (I would never make fun of someone for trying to help me)!
General descriptions are extremely helpful, because this final is more focussed upon concepts than details. Your comparison of the two helps me to understand the concepts behind the two formats and what I should say on the test. So seriously, thank you! |
Ahh, good, in this troll eat troll blog-o-sphere, you never know.
PS. I hate the term blog-o-sphere, but I figured I should try it before shunning it, and I shall never use it again. |
I don't know if this is useful, as I've always taught myself only enough to be dangerous, and not a bit more (Back when I was in school, we didn't have this fancy inter-web thing! We had telnet, ftp, news, gopher, and archie. And we liked it!). It seems to me that one of the biggest practical differences between tables and divs is that tables are supposed to expand to enclose their contents, while divs are not. This is readily apparent on this site, whenever someone posts an oversized image on their blog. You'll notice unless they've changed the CSS to accommodate it, the image spills over past the right side of the post div.
As far as which is theoretically better or any other such nonsense, don't ask me! |
For what it's worth, CSS2 allows you to indicate with the CSS that an element should be formatted as a table. For an editing tool my team is responsible for, we found this to be a very useful way to handle tables, since it removes the need for an editor/browser to know about specific table tags.
http://www.w3.org/TR/REC-CSS2/tables.html#q2 Given this, a set of divs (or other elements) can behave exactly like a table...so the trusty old table element takes another hit! |
PS: Good luck, I hate tests and essays, especialy big ones.