Tables vs. <div>

Discussion in 'Technology' started by leopard22, Apr 27, 2006.

  1. leopard22

    leopard22 Registered Member

    I still get really messed up in the head when I use <div></div>. I guess I just find it easier to use a table if I need a column layout in HTML.

    Everyone says that if I just stick with it, it'll eventually click in my head and all will be good, but I don't usually have the time to sit down and do that. I need to do the layout now and so I'm always putting it off.

    Does anyone know of a tutorial somewhere that lays out the <div> function clear enough that an idiot can figure it out? I'd really like to move beyond tables because everyone also says that <div> is more flexible and quicker once you start using them.
     

  2. Mr_Snipes

    Mr_Snipes Registered Member

    Personally, I see nothing wrong with using tables. They work just fine. I use them all the time. It I need to separate stuff into columns, then I use tables.

    If I am writing text that does not need to be separated into columns then I usually use <p>

    I don't know how they could be faster than using a table.
     
  3. Mirage

    Mirage Administrator Staff Member V.I.P.

    I have been experimenting with using DIV recently. It's better than tables if you are making a site 100% in CSS because you can move the cells around without having to change their location in the code. This is good if you want to have your content ranked higher so that search engine bots read it before other areas of the page, but you want your content on the right side of the page.

    There are things you can do to play around with it, but it's also kind of confusing to get it to work correctly sometimes.
     
  4. leopard22

    leopard22 Registered Member

    Yeah, I'm trying to master the complexities of CSS and that's what has got me into this mess with DIV. I can do a simple CSS and get it to work just fine, but anything more complex and it's a real crap shoot as to what shows up in the browser.

    Andrew, you said the content needs to be on the right side - did you literally mean the "right" side as opposed to the left or just the "correct" side? I was playing around with a blog template and added some javascript code in where it was supposed to go without hurting anything, and all of a sudden my sidebar was pushed over so far it was displaying beneath the rest of my template. I messed around with the DIVs for awhile trying to match them up, but ultimately failed and reloaded the entire template instead.

    Do DIV tags need to match up (i.e., each <div> have a </div> and vice versa)?
     

Share This Page