SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot tragu's Avatar
    Join Date
    Sep 2002
    Location
    Canada
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make a cross-browser 1 pixel border using CSS

    Is there anyway to make a 1 pixel table border using CSS which works in both IE and NN?

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Code:
    <style type="text/css" media="screen">
    table {border: 1px solid #000;}
    </style>
    Of course, this won't work in NS4, but does that really matter?

    --Vinnie

  3. #3
    SitePoint Zealot tragu's Avatar
    Join Date
    Sep 2002
    Location
    Canada
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vgarcia, I use the same technique. It doesn't work in netscape 4.7(my current version of NN). That's why I'm looking for an alternative technique.

  4. #4
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Notes on the CSS Border attribute (incl. shorthand)...

    Notes in Netscape 4.0:

    * Border properties turn inline elements into block elements
    * Border properties do not work (properly) with tables, table cells, form fields, hyperlinks, images, lists, and list items
    * Default value for "border-style" is "solid", not "none" as it is written in the specification
    * Default value for "border-width" is "0", not "medium" as it is written in the specification
    It should work fine as long as it isn't one of those tags mentioned in the second instance.

    http://www.w3schools.com/css/pr_border.asp


    I'm guessing, but you might be able to work around it by nesting the unsupported tags/elements inside a <span> (for which NN4 does support the various longhand and shorthand css border attributes).

    Just an (untested) idea.
    Last edited by Bill Posters; Nov 23, 2002 at 02:26.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature


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
  •