SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: CSS troubles

  1. #1
    SitePoint Member
    Join Date
    Jun 2001
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS troubles

    I am trying to get this site to work and I have been looking at it for a while and could not get it to work. My problem is that the css margin and border attributes that I set for two of my cells are not appearing.
    Here is my code. Any help would be greatly appreciated.
    <html>
    <head>
    <style>
    body {font-family : arial, helvetica ; font-size : 10px;}
    td.db {background-image : url(graphix/1pixelDarkBlue.gif);}
    td.lb {background-image : url(graphix/1pixelLightBlue.gif);}
    td.g {background-image : url(graphix/1pixelGrey.gif);}
    td.margin {margin : 12px;}
    td.border {border : 1px blue;}
    </style>
    <title>
    </title>
    </head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <table width="100%" height="80" cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td rowspan="2" width="152" height="60"><img src="graphix/a1.gif" /></td>
    <td rowspan="2" width="49" height="60"><img src="graphix/a2.gif" /></td>
    <td class="db" rowspan="2" height="60">
    </td>
    <td class="db" height="20" width="19"><img src="graphix/a3.gif" /></td>
    <td bgcolor= "white" height="20" width="225">
    </td>
    </tr>
    <tr>
    <td class="db" colspan=2 width="244" height="40">
    </td>
    </tr>
    <tr>
    <td width="152" height="20"><img src="graphix/b1.gif" /></td>
    <td class="db" colspan="2" height="20">
    </td>
    <td class="db" colspan="2" height="20" width="244">
    </td>
    </tr>
    </table>
    <table width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="180" height="41" class="lb"><img src="graphix/c1.gif" /></td>
    <td rowspan="5" class="margin">
    Home
    </td>
    </tr>
    <tr>
    <td class="lb" width="180" height="19">
    </td>
    </tr>
    <tr>
    <td height="300" width="180" class="border">
    </td>
    </tr>
    <tr>
    <td width="180" colspan="3">
    </td>
    </tr>
    </table>
    <body>
    </html>

  2. #2
    SitePoint Zealot Jenna's Avatar
    Join Date
    Jul 2002
    Location
    Atlanta, Georgia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try changing

    td.margin {margin : 12px;}

    to

    td.margin {padding : 12px;}

  3. #3
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ditto on what Jenna said.

    Also, you need to declare a border-style:

    td.border {border : 1px solid blue;}

    You also missing the closing "/" in the </body> tag.

    HTH


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
  •