Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS border styles question 1

Status
Not open for further replies.

viol8ion

Technical User
Feb 8, 2001
1,260
0
0
US
I have been working with HTML for years, only recently began playing with CSS. After extensively reading W3C.org CSS faqs, as well as searching this site, I am still clueless. I am sure it is something stupid that I am overlooking.

I have a site with a linked style sheet. I have a table with a cell an image. Another cell below with SSI menu that is simply 6 cells across with links.

Below that another cell with an image.

The problem: the cells insist on displaying white borders in IE as well as Mozilla. I ewant no borders between cells. I can easily do this in HTML, but I want this to be totally CSS compliant. Here is a link to the page in question:


Here is the table CSS code:

table { left: auto; top: auto;}table { font-family: verdana, sans-serif; margin-left: 0px;color:black; background-color: #ffffff;; background-position: left top; text-align: left; clip: rect( ); vertical-align: top; width: 100%; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: small; font-style: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; clear: none; float: none; letter-spacing: normal; word-spacing: normal; border: #000000; border-style: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px} .head { text-align: center}
.head-r { text-align: center; background-position: center top; width: auto; clip: rect( ); vertical-align: text-top}
td { text-align: center; clip: rect( ); vertical-align: top; list-style-type: circle; width: auto}li { text-align: left }

When in doubt, deny all terms and defnitions.
 
The tables will have a space between the cells if any of the following declarations is bigger than zero:

cellspacing, cellpadding, border;

border and cellpadding (padding) one can control with css, while to my knowledge, there is no css property for cellspacing. Just specify cellspacing="0" in your tables, if you have padding and border to none in your css, that should do it. but setting cellpadding and cellspacing in your table, as far as I know, is XHTML compliant, so there's no problem using it.

Hope it helps.
 
GREAT! That almost did it.. it removed the spacing away from everything except the image named bottom.gif. I had to specify border="0" in the HTML for that, even though I have CSS set for border="0" throughout.

At least all that code is now W3C compliant... a few more quirks to iron out, such as why it is failing the validation due to a missing "TR" when all of the code is in fact intact. No missing tags whatsoever.

When in doubt, deny all terms and defnitions.
 
Looking at your code, off the top of my head:
Code:
  <p class=&quot;cellblackhead&quot;><img src=&quot;images/logo2.jpg&quot; width=&quot;495&quot; height=&quot;72&quot; alt=&quot;michael cagno studios logo&quot; class=&quot;cellblackhead&quot;></p>
 </td>
Code:
</tr>

Code:
<tr>
Missing closing for table row.
Code:
    <td class=&quot;cellblack&quot;><font color=&quot;#FFFFFF&quot;><a href=&quot;links.shtml&quot;>Links</a></font></td>
  </tr>
Code:
<tr>

Code:
  <td colspan=&quot;5&quot; class=&quot;p_right&quot;>
Missing begining of table row. You should also note that tag <font> is deprecated.
 
Doh!

And I must have looked at that code 20 times and missed that! Just goes to show that you see what you want to see, not necessarily what is there. And now all is well in thew world... well, in my little world.

Thanx!

When in doubt, deny all terms and defnitions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top