problem with table borders in css

Posted on 2011-04-26
Medium Priority
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
  • 2
  • 2

Author Comment

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

Expert Comment

ID: 35471632

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

ID: 35471653
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

remorina earned 1000 total points
ID: 35471876
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.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses
Course of the Month9 days, 18 hours left to enroll

569 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