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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cellspacing

Status
Not open for further replies.

Halcrow

Programmer
Aug 24, 2004
76
GB
I'm making a site which contains a table (!) and I want it styled so that each column is seperated by a solid line.

I set the left margin of each cell to be a solid line (e.g. margin-left: 1px solid #fff), then looked at my table. The cells had a little space between each of them, breaking my desired solid line.

The only way I can see to fix this is by setting the cell spacing to 0 in my html (cellspacing="0"). It works, but I want my code to be valid Strict xhtml1.1, and I guess that doing this is invalid. Even if it is valid, it spoils my otherwise complete seperation of content and style.

Is there a way around this problem using css?

Thanks
Calum
 
table {
border-collapse: collapse;
}

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top