SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    May 2002
    Location
    Oslo
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with CSS and NS4.X

    I have this CSS used to draw a frame around a table cell:

    .ch
    {

    margin : 0;
    padding-left : 0%;
    padding-right : 0%;
    border-style : solid;
    border-right-width : 1px;
    border-left-width : 1px;
    border-top-width : 1px;
    border-bottom-width : 1px;
    margin : 3px;
    padding: 0px;
    border-color : #888888;

    }

    Used like this:
    <table>
    <tr><td class="ch">Hello</td></tr>
    </table>

    This CSS works fine in all browsers except in Netscape 4.x.
    Can anyone tell me why???

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Perhaps because NS4.x has crappy CSS support?

  3. #3
    SitePoint Zealot 19nine78's Avatar
    Join Date
    Feb 2002
    Location
    Ayr, scotland
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup, really crappy

    cheers

    alastair

  4. #4
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ditto what those two said, but you might as well condense your code a bit. I took your 11 lines and replaced them with only 3 of mine.
    Code:
    .ch {
      border: 1px solid #888888;
      margin: 3px;
      padding: 0px;
    }
    You also had a few properties defined twice, so I removed the needless ones.

  5. #5
    Posts rarely lloydi's Avatar
    Join Date
    Jan 2002
    Location
    Swindon UK
    Posts
    620
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about trying this:

    div.ch {
    border: 1px solid #888888;
    margin: 3px;
    padding: 0px;
    }

    <table>
    <tr><td><div class="ch">Hello</div></td></tr>
    </table>

    It may be more successful than applying directly to the TD.
    Build Your Own Web Site the Right Way!
    A beginners' HTML/CSS book with web standards at its heart
    The Ultimate HTML Reference
    A complete reference, in glorious hardback

  6. #6
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Ah yes, old Netscape 4.7x never really could manage the border attribute via CSS without workarounds.
    Last edited by xhtmlcoder; Jun 6, 2002 at 02:58.


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
  •