SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Jul 2002
    Location
    Chicago
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Padding, CSS, and Netscape 4

    My boss wanted some space between every cell in every table - among other things. To do this, I added this to the style sheet:

    td {
    padding: 4px;

    }


    This did exactly what he wanted. Unfortunately, it has also created a great deal of white space above the table in Netscape Communicator 4.79 for Windows (and probably the Mac and Unix/Linux/BSD versions as well).

    Is there any way to fix this?

    In case it matters, the rest of the style sheet looks like this:

    /* CSS Document */

    body {
    color: black;
    font-family: Arial, Helvetica, Geneva, sans-serif;
    font-size: 16px;
    font-weight: bold
    background-color: white
    }

    #content {
    margin-top: 35px;
    position: absolute;
    left: 5px;
    width: 720px;
    }

    .menuStyle {
    color: #000000;
    font-size: 14px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    background-color: #ccc;
    padding: 5px;
    width: 100%;
    }


    #menuHead {
    background-color: silver;
    position: absolute;
    z-index: 50;
    top: 0px;
    left: 0px;
    visibility: visible;



    }


    #menuHead1 {
    position: relative;
    }

    #menu1 {
    position: absolute;
    z-index: 100;
    width: 200px;
    visibility: hidden;

    }

    #menuHead2 {
    position: relative;
    }

    #menu2 {
    position: absolute;
    z-index: 100;
    visibility: hidden;
    width: 200px;
    }

    #menuHead3 {
    position: relative;
    }

    #menu3 {
    position: absolute;
    z-index: 0;
    visibility: hidden;
    width: 200px;
    }

    a.menulink:link {
    font-weight: bold;
    text-decoration: none
    }

    a.menulink:visited {
    font-weight: bold;
    text-decoration: none
    }

    a:active {
    color: red;
    }

    a.menulink:hover {
    color: #900;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-decoration: none;
    }


    a:link {
    color: blue;
    }

    a:visited {
    color: purple;
    }

    a:hover {
    color: maroon;
    }

    /* My additions start here. */

    p {
    font-family: Arial, Helvetica, Verdana, sans-serif;
    margin-left: 20px;
    font-weight: bold
    }

    p.right {
    text-align: right
    }

    p.indent {
    margin-left: 40px
    }

    p.bottom {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
    }

    p.small {
    font-family: Arial, Verdana, Helvetica, sans-serif;
    font-size: 12px;
    }

    h1 {
    font-size: 24px;
    font-weight: bold;
    margin-left: 20px
    }

    h1 underhead {
    font-size: 20px;
    font-weight: lighter
    }

    h2 {
    font-size: 18px;
    font-weight: bold;
    margin-left: 20px
    }

    b {
    font-weight: bolder
    }

    strong {
    font-weight: bolder
    }

    table {
    margin-left: 20px;
    font-size: 14px;
    font-weight: bold;
    border-style: solid;
    border-width: 1px;
    border-color: black;
    }

    table.form {
    margin-left: 20px;
    font-size: 16px;
    font-weight: bold;
    border-width: 0px
    }

    table.layout {
    margin-left: 20px;
    font-size: 14px;
    font-weight: bold;
    border-width: 0px
    }

    table.layout tr {
    vertical-align: top;
    font-weight: bold
    }

    table.form tr {
    vertical-align: bottom;
    font-weight: bold;
    text-align: left
    }

    td {
    padding: 4px;

    }

    tr {
    border: 1px;
    text-align: left;
    vertical-align: top;
    font-weight: bold;
    text-align: center;
    }

    tr.head {
    font-weight: bold;
    background-color: blue;
    color: white;
    text-align: left;
    }


    tr.state {
    font-size: 20px;
    font-weight: bold;
    background-color: blue;
    color: white;
    text-align: left
    }

    tr.alternating {
    background-color: cyan;
    }


    For the time being, this issue is seen on this page among others.

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use this in the table

    style="display:inline;"
    style="margin-top:0px;"
    style="margin-bottom:0px;"

    whys everyone posting non-javascript questions in this thread today

  3. #3
    SitePoint Member
    Join Date
    Jul 2002
    Location
    Chicago
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I'll try that.

    Last I checked this is the DHTML and JavaScript forum. CSS (and DOM and JavaScript and Netscape Layers and Active X and ) is a part of DHTML.

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Home / Build your Site / Web Page Design / CSS

    dont ya think that would have been more appropriate though lol

  5. #5
    SitePoint Member
    Join Date
    Jul 2002
    Location
    Chicago
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, my eyes saw DHTML and JavaScript first.

    That code got rid of the white space. Unfortunately, it also got rid of cell background colors. Without rewriting every page in HTML 3.2, is it possible to get the colors back in Netscape 4?
    Last edited by AdamXS; Jul 30, 2002 at 07:50.

  6. #6
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup

    style="background-color:ghostwhite;"

  7. #7
    SitePoint Member
    Join Date
    Jul 2002
    Location
    Chicago
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No way to do it without making every single page significantly larger?

    Oh well, Netscape 4 and tables in external style sheets never did play nice together. The six people still using Netscape 4 as their primary browser can live with white-background tables.

  8. #8
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    stick it in an external stylesheet, and reference the stylesheet


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
  •