SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: what is best to do instead table?

  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2004
    Location
    Netherlands
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    what is best to do instead table?

    The table i.d:

    <table width="250" border="1" color="#000">
    <tr>
    <td colspan="2">
    some text line
    </td>
    </tr>
    <tr>
    <td colspan="2" bgcolor="#something">
    content
    </td>
    </tr>
    <tr>
    <td bgcolor="#something" width="50%">&nbsp;</td>
    <td bgcolor="#somethinglittledarker" width="50%">text</td>
    </tr>
    </table>

    This in css?

    <div class="first tr table">text</div>
    <div class="second tr table">content</div>
    <div class="thridrow"><div class="floatrighttd">dfdfdf</div</div>

    Any who can advise?

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What content are you trying to display? If it is tabular data, then a table is best. If not, then use the most suitable HTML element for the job.

  3. #3
    SitePoint Evangelist
    Join Date
    Nov 2004
    Location
    Netherlands
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No table. Box with header(bg different color) content with centered img. and txt under in box kind of footer with kind of floating element for link text.

  4. #4
    SitePoint Member dpsites's Avatar
    Join Date
    Nov 2005
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there "dancing-mathilde"..

    Im not too sure what it is your trying to say, but from the looks of things you are trying to create a "1 colum, 3 rowed" design. This would accoutn for a header image, and main content image, and a footer.

    If you wish to bring this into CSS rather then using a table, you will need to do the following.

    First, Create your overall container, This is 1 Big DIV that all your other "Divs" sit inside. With this container, you can specify the size of your webpage allowing you to cater for smaller resolutions.

    Once you've created your main container DIV, you will need to create your 3 content Divs's.

    1) Header
    2) Content
    3) Footer

    You will end up with something like this ...

    Code:
    <div id="container">
          <div id="header"></div>
          <div id="content"></div>
          <div id="footer"></div>
    </div>
    Obviously, to get your "Div's" inline, you are going to need to write your style sheet. If you know your CSS this will be a relatively easy layout.

    If not, may i advise that you visit w3schools.com or pixel2life.com

    Both of these websites have great CSS tutorial sections.

    I hope this has helped

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •