#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    1
    Rep Power
    0

    Table borders in CSS


    I am learning CSS and wish to put a border around selected tables using the following code:

    table.sidebar
    {
    border: 2px black;
    padding: 50px

    }


    Something similar to this code was working OK earlier today, but now it won't. The cell padding command works, but other tags like border, width, etc., are not. I have tried disabling all other table styles in the CSS.

    Any ideas? I am using MS FrontPage 2002. Also, whys is it that when I apply a style to a table, like the one above, FrontPage puts in the following HTML code:

    <table class="sidebar" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">

    If I go to remove it to
    <table class="sidebar">
    all of the formatting is lost. Seems like this is defeating the whole purpose of CSS

    Thanks,

    Keith
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    3
    Rep Power
    0
    You forgot to specify the border style
    table.sidebar
    {
    border: 2px black solid;
    padding: 50px

    }

    alternatively you can set each attribute seprately:
    table.sidebar
    {
    border-width: 2px;
    border-color: black;
    border-style: solid;
    padding: 50px
    }

IMN logo majestic logo threadwatch logo seochat tools logo