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

Need gridline effect

Status
Not open for further replies.

PeteG

Programmer
Feb 23, 2001
144
GB
Hi,
I haven't done much HTML but I need to edit a few files to change the appearance of tables within them. Basically I need all of my tables to appear like this; the top row is to be 'gridline', ie a solid border around each piece of data within the row (these are the column headers). Any subsequent rows are to have solid lines on the left and right but not top or bottom. I can get a border to appear around the whole table but not individual rows within the table. Can anyone offer any advice or point me in the right direction? I can see the benefit of using a stylesheet, and I have one to use(!) but I can't yet enter the right detail to make the display as stated above. Cheers.
 
Code:
table {
  border-collapse: collapse;
  border: 1px solid black;
}

th {
  border: 1px solid black;
}

td {
  border-left: 1px solid black;
  border-right: 1px solid black;
}
Where th describes table header row and td regular table cells.
 
thanks v much - got it sorted now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top