Jump to content

Div vs Tables


heldenbrau

Recommended Posts

I am just learning CSS and have decided to do my next site with CSS.  I am testing the site first with IE and Firefox and have had to switch back to using tables instead of DIV's on one of my pages.  The reason is:  If I have a 78% Div within a Div, Firefox renders the Div as being 78% of the page, but IE renders the DIV as being 78% of the Div that it is in.  So it will either be too long in one or too short in the other.  But both render tables the same way, that's why I have switched to tables. 

 

Is there something I am missing with using Div and float?  If the 2 different browsers render them differently, which they have been with me, then the page ends up looking a right mess.

 

 

Link to comment
Share on other sites

Another thing.  If I have divs floated to the left and a div floated to the right.  If I put text on the next line after the divs floated left, it comes out in the space between the last div and the right div in IE.  It comes out on the next line in Firefox.  So If I use <br> to get it to the next line, it makes a massive gap in firefox.  Even if I put the text into another div, it still doesn't go onto the next line in IE.

Link to comment
Share on other sites

No up-to-date professionals use tables anymore. Exceptions apply of course. IMO tables should only be used when data/info needs to be presented in a table online, if you can understand what that means. If you had a clearer understanding of xhtml, tables, and divs, then the results you are trying to achieve, whether it be floating divs or stretching them based on percentage can be achieved using either. I choose not to adjust anything based on browser size because I find for the most part it's very sophomoric. I'm sure there's arguments for and against it though. My advice would be, since you just got into css, do what you feel comfortable with. Then in the future you can grasp the trends, read some tuts, and and gain further knowledge to advance your skills. GL. :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.