wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes HTML Table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML Table "Stripes"  with CSS" Watch "HTML Table "Stripes"  with CSS" New topic
Author

HTML Table "Stripes" with CSS

Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
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

Joined: Jan 10, 2002
Posts: 60752
    
  65

Hi Kim, it would be most helpful if you could post a minimal, but complete, HTML file that shows your problem.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
add

border-collapse: collapse to the table.

Eric
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
set the cellpadding="0" and cellspacing="0" on the table. See if that makes a difference.

Eric
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
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.
 
 
subject: HTML Table "Stripes" with CSS
 
Similar Threads
Need help editing some css if possible (SOLVED)
Remove unwanted space before and after the table using javascript
Safari and IE issues.
tabbed pane
Regarding Scrollable Table