SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Feb 2000
    Location
    Minnesota
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    So, is it possible to add color to table borders using CSS for Netscape??

    This is what I am using, but it's not working in Netscape.

    <table width = "100%" bordercolor="#FFFFFF" border=3 cellpadding=4 cellspacing=1 bgcolor="#5F8FB0" style="border-style: solid; border-color: #ffffff; color: #ffffff; border-width: 3px">

    Is there any way I can get rid of the ugly grey borders that Netscape uses? Also, if possible, I would like to accomplish this border color without using the embed a table within a table method.

    Thanks!
    Keomed.com Webmaster
    www.keomed.com

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You cannot use CSS to achive a bordered table in Netscape. The ony way to accomplish this is to use nested tables.

    Plus you should be using quotes on all values for your attributes (border=3). Also, if you plan on defining table attributes with CSS, then you don't need to define the same attribute in the HTML. It's self defeating and could potentially cause problems with rendering (what does the browser choose?).
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey creole,

    I been using this trick for some time now. Works in all the 4 major browsers. I'll include a width too.

    Try this =)

    div.example { border : 1px solid #000000; width : 700px }

    <div class="example">
    <table width="100%">
    <tr>
    <td>This is a TEST for producing Borders round tables</td>
    </tr>
    </table>
    </div>
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm...

    That's an interesting trick Lyon. I made some changes to the code and got it looking pretty good. THe only drawback I noticed was that the code you posted does not allow the borders to get RIGHT up onto the contents of the table in Netscape. Here is a screencap of the results done in Netscape:

    http://www.gravitydigital.com/misc_u.../table_cap.gif

    In IE, the two methods are indentical. Here is the code that I used. The DIV class is the same as the one you posted so I left that style declaration out:

    <div class="example">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
    <td>This is a TEST for producing Borders round tables</td>
    </tr>
    </table>
    </div>

    <br>

    <table cellpadding="1" cellspacing="0" border="0" width="100%" bgcolor="#000000"><tr><td>
    <table cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#ffffff"><tr>
    <td>This is a TEST for producing Borders round tables</td>
    </tr></table>
    </td></tr></table>
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm..Nice work creole.

    Could try margin or padding to allow netscape to show right up to the borders. Haven't tried though. Afterall, I wanted the padding.
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  6. #6
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The only thing I'd add is to protect your **** later you should be fully calling all CSS styles:

    div.example { border : 1px solid #000000; width : 700px }


    Shoudl really read:

    div.example { border-width: 1px; border-style:solid; border-color:#000000; width : 700px }

    Only so that if you @import or export the css any conflicts that do arise won't affect the whole border style just the one element like width/style/color.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright


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
  •