Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML Table "Stripes" with CSS

 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All, not sure if this is going to work, but going to try to explain this problem.

I have a table that when I render, after three rows, I apply a differant style for the next three rows, and then go back to the original style for three rows, in order to create a "striped" table effect.

My question is this, on the set of 3 rows that are blue in the background color, you can see a white line seperating each row. I would like the three rows to show up as just a solid blue, no white lines seperating each row. The tricky thing is, I do like this effect for the table header rows. I have tried to make this go away in the blue rows but no luck.
Any tips ? Thanks! Here is my CSS :

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kim, it would be most helpful if you could post a minimal, but complete, HTML file that shows your problem.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add

border-collapse: collapse to the table.

Eric
 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you both so much for offering help. I did try adding border collapse to the table but this did not do the trick unfortunately.

Not sure if this is what you had in mind, but here is my html for this table:


[ April 12, 2007: Message edited by: Kim Kantola ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set the cellpadding="0" and cellspacing="0" on the table. See if that makes a difference.

Eric
 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, not sure what I had wrong before, but just got the border-collapse to do the trick of what I wanted. I wish this property could be set per row though, but it only appears to be set per table. I was wishing it could be per row because I actually do like the spaces between cells in the header rows. Can't seem to get it to work on only part of the table, it looks like it is all or nothing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic