SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2002
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question CSS borders for tables?

    I'm just starting to learn CSS and I'm having a problem.

    I want the top 120 pixels of my page to be a solid color, and at the bottom I want a line seperating it from the rest of the page.

    I made a table with only one cell that expands the whole width and 120 pixels down but I keep trying to use CSS to make a dotted border on the bottom of the table. I keep getting no border at all.

    Code:
    <HTML>
    <HEAD>
    <TITLE>Name</TITLE>
    <STYLE TYPE="text/css">
    <!--
    TABLE(border-width:0px)
    -->
    </STYLE>
    </HEAD>
    <BODY BGCOLOR=white topmargin=0 leftmargin=0>
    <table cellpadding=0 cellspacing=0 width=100% height=120 style="border-bottom-width: 5px; border-color: #000000;"><tr><td bgcolor=0076A3></td></tr></table>
    </BODY>
    </HTML>
    That's what I have so far. Why isn't it making a border? If there an easier way to do this without using a table at all?

  2. #2
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:
    Code:
    <HTML>
    <HEAD>
    <TITLE>Name</TITLE>
    </HEAD>
    
    <BODY BGCOLOR=white topmargin=0 leftmargin=0>
    <table cellpadding="0" cellspacing="0" width="100%" style="height:120; border-bottom: 5px dashed #000000;">
    <tr>
    <td bgcolor="#0076A3">&nbsp;</td>
    </tr>
    </table>
    </BODY>
    </HTML>
    That should do the trick.
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com


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
  •