problem with table borders in css

Posted on 2011-04-26
Last Modified: 2012-05-11
I cannot figure out what is causing the borders in the tables on this page

I have cleared out any borders that I could think of but there are still some there.  
Question by:brightsusan

    Author Comment

    Forgot to mention that it is in Firefox that the borders show
    LVL 22

    Expert Comment


    There are several reasons for the borders showing.

    Your CSS contains the below rule which obviously defines a solid border for the table td

    .table td {
        border: 1px solid #666666;
        font-size: 11px;
        padding: 1px;
        text-align: center;
        vertical-align: middle;

    Open in new window

    On the other hand you have a border="1" and a rules="all", where border="1" will result in a border in all browsers, rules="all" will work only with mozilla and other browsers but will not work with internet explorer

    <table width="467" border="1" cellspacing="0" rules="all" class="table" id="ctl00_dgrReport">

    Open in new window

    In order to eliminate the borders you need to remove them all.


    Author Comment

    I thought that my css for that div would override the css for all other tables.  I want the other tables to have borders but not this one.  How would I write the css for that?

    also, I will be changing the information in the table out periodically so how can I set that rules="all" to not be there automatically.  In other words where I won't have to go in each time and remove it.
    LVL 22

    Accepted Solution

    Removing the rules=all alone should make it work for that Pink div while keeping other tables with borders as intended.

    Quoted: "rules="all" indicates that all the internal borders should be visible. rules="all"  is usually used in conjunction with frame="void" so that there are outer borders but no inner borders. "

    I'm not sure why updating the table information would automatically re-insert the rules="all" property, I have Adobe Dreamweaver CS4 on my machine and it doesn't insert the rules property when inserting tables however I believe you'd have to make sure it's removed in order for the borders not to show.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
    Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
    In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
    In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at Browse or search based on font properties or name to find a suitable font for…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now