Web Analytics Made Easy -
StatCounter Table Equivalent - CodingForum

Announcement

Collapse
No announcement yet.

Table Equivalent

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Table Equivalent

    I understand that using <tables> to align things such as footers is frowned apon, I was wondering if there was a CSS Table Equivalent to do the same thing. Right now I have four columns and then a title, and five links inside the columns. I have drawn an example in paint, see below.


  • #2
    something like this - change styles to suit.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
            <title></title>
            <style type="text/css">
                #colCont {
                    width: 670px;
                    height: 200px;
                    margin: 20px auto 0px auto;
                }
                .columns {
                    float: left;
                    width: 150px;
                    height: 100%;
                    border: 1px solid red;
                }
                .columns ul {
                    width: 70%;
                    list-style-type: none;
                    margin: 0px auto 0px auto;
                    padding: 0px 0px 0px 0px;
                }
                .columns h4{
                    text-align: center;
                }
            </style>
        </head>
        <body>
            <div id="colCont">
                <div class="columns">
                    <h4>Title 1</h4>
                    <ul>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                    </ul>
                </div>
                <div class="columns">
                    <h4>Title 2</h4>
                    <ul>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                    </ul>
                </div>
                <div class="columns">
                    <h4>Title 3</h4>
                    <ul>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                    </ul>
                </div>
                <div class="columns">
                    <h4>Title 4</h4>
                    <ul>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                        <li><a href="">Item 1</a></li>
                    </ul>
                </div>
            </div>
        </body>
    </html>

    Comment


    • #3
      Thanks
      Last edited by canu; Aug 29, 2011, 03:59 AM.

      Comment

      Working...
      X