HTML Tables vs CSS & divs - examples/help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • weblover50
    Member
    • Jan 2009
    • 41

    HTML Tables vs CSS & divs - examples/help

    Admittedly, I'm new to CSS but I am having some difficulty converting tables to CSS. Here is a CSS example for a simple 4 cell table that works fine -- but only without the DOCTYPE declaration (any DOCTYPE declaration)!

    Does anyone know what, if anything, I am doing wrong ? Any help would be appreciated.

    (Also I would like to see any successful examples anyone would like to post.)

    Help with Code Tags

    (Toggle Plain Text)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html>
    <head>
    <style type="text/css">
    .TblContainer {
    width:400px;
    font-family:Arial,Helvetica,sans-serif;
    background-color:yellow;
    border:1px solid #CCCCCC;
    margin:3px 3px 3px 3px;
    }

    .Row {
    margin:3px 3px 3px 3px;
    }

    .Cell {
    color:#000000;
    border:1px solid #CCCCCC;
    float:left;
    font-size:16px;
    text-align:center;
    width:49%;
    }
    </style>
    </head>
    <body>
    <div cl***="TblContainer">
    <div cl***="Row">
    <div cl***="Cell">Cell 1</div>
    <div cl***="Cell">Cell 2</div>
    </div>
    <div cl***="Row">
    <div cl***="Cell">Cell 3</div>
    <div cl***="Cell">Cell 4</div>
    </div>
    </div>
    </body>
    </html>
  • Finkoo
    Junior Member
    • Nov 2008
    • 6

    #2
    I found out that using CSS and DIV tags are the ideal for website design because you can make one change to a CSS file and it changes it across the entire website but it DOES NOT EFFECT YOUR SEO. Which to me was the most important part. So I have decided not to re-build my website in CSS right away but I am going to slowly construct a test site just so I can build my knowledge about DIV tags and CSS.

    Comment

    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎