• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

specify cell border in stylesheet

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if I specify <table border=1>...</table>
all the cells in the table have a border
but if I specify it in the stylesheet
like
#displayTable1 table{
border: thin solid #0000ff;
}

and then in my html:
<div id="displayTable1>
<table>
...
</table>
</div>

only the border around the table shows up, there's no border on the individual cells
so I have to do

#displayTable1 table{
border: thin solid #0000FF;

border-collapse: collapse;
}
#dataTable1 td{
border-color: blue;
border-style: solid;
border-width: thin;

}
in order to achieve the same effect as <table border=1...>..</table>
however it seems like border-collapse:collapse does not work, each cell has its own order and does not overlap to one with the adjcent cells.
how do I fix this problem in css?
thanks
[ December 17, 2004: Message edited by: jonathan hello ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a good reference, it talks about it about half-way down the page.

http://academ.hvcc.edu/~kantopet/xhtml/index.php?page=css+table+styling&parent=xhtml+tables

Eric
 
jonathan Greens
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Eric, but that's exactly what I did. In fact, it's this reference that motivated me to create the css style. However, it simply doesn't collapse the borders of the cell even when i specify it to do so. what's going on?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic