![]() |
<table> <td> <tr> << Why are they thought of as "Evil"?
Hi Folks.
Just wondering here. Why are <table> and it's partners hated so much? I mean a lot of people claim "To go css only" I understand that, but you can anyway even if you use css.. for example: Code:
<table class="table1layout"> So why is it so bad? I still use tables when I make websites. As I don't see why I have to change this for example: Code:
<DOCTYPE HTML> Code:
<DOCTYPE HTML> But I really don't see any advantage to it. As it still passes validation with table. and yet, if I use div, sometimes it makes it a royal pain in the... to get the desired result as text will appear out of line etc. So why are tables hated so much? Or was it simply started because some person prefered to just type div all day long? |
The world is moving to a place where data is separated from the presentation. ;) That is, the styling is stored in CSS. This is called semantic (X)HTML. Tables are not all bad - they should still be used for tabular data. Currently, tables are used heavily in positioning, etc. This is what is "despised".
|
I see.
So theirs not much choice eh? :p I'm one of those people who use tables heavily in positioning. I'll go play with a website to see if I can replace them with a div, maybe some div will be able to work for me :-) Thanks EDIT: Ok, switch everything to div and the site goes kboom and falls over :p BTW: Is their any tags which do the same as tr and td? rather than just using div? as it's making it a royal pain. |
Don't think of just replacing tables, columns and rows with divs. For example, a list of links (e.g. navbar) should use use a ul (unordered list) element. Google around for some semantic HTML explanations.
|
Well googling, tells me all this is to do is so the computer can read it?! I want people to read my site, not computers :p
I got my header working fine, that looks as it used to now, using only divs, were ul & ol etc would not be very useful anyway. However, I've now got 2 problems. Main content box has a margin.. and is still there, BUT. It's now got a frigging white border in place of a margin were it never used to, but had the margin matching the colour needed. Is there a way to fix that? And now, I used to have 2 tables next to each other, one on the left, one on the right.. now it sits under it now it's a div! Way to fix that? :D Heres my code (without header and footer, as the main index pulls them in with a php require) Code:
<div class="page"> Some of the CSS being used in that particular template file: Code:
.tmain PS: Sorry for the odd questions. I know it's not related to vB.. but I figured.. What better place to ask than a modification community? where most of the people modify templates all day :p This worked fine when it was tables and td's etc. I learn from example and from seeing code and trial and error.. a block of writing would just confuse me. Just so you know ;) Thanks again! |
Quote:
Again, semantic HTML is not replacing all tables with divs. I can see in your code there are just random nested containers. An example is this: HTML Code:
<div> Quote:
Quote:
|
When they are used for layouts and positioning they create lots of markup which makes it harder to find bugs and things. Also divs have alot less markup when making a big app. This makes editing things easier.
|
1 Attachment(s)
I see.
I've attached 2 screenshots, one is how it's supposed to look, and is using tables. Other is using divs and is quite badly broken. Also, Here is the original table code: Code:
<table class="page"> Floating containers? Never heard of them x-x. care to provide some examples? Also "menuboxmiddle" is simply the refer to css. originally made for the old side menu (Which is extinct) Thanks! PS: Attachments look awful after uploading them :( |
You can't just take an existing layout and "semanticise" it. (Well, you can, but it takes a lot of work.) You will probably be better off starting afresh, with guidance from the many websites out there who provide tutorials and the such.
|
Hmm ok. Well I guess it's back to the "drawing board" for me :D (Yes I really have one actually)
Considering tables are not "extinct" just yet. I've decided to roll out the table version at first (When it's complete). And then later on start work with a new one (Using semantic html) :-). For me that's more convenient, as firstly, I don't basically throw away a whole website and at the moment my time on coding the website half is.. well in half (I got more than websites to code with this project :eek:) Thanks guys for advise and such :) |
All times are GMT. The time now is 07:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|