This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

HTML Table "Stripes" with CSS

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 :

 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic