Hi,
I need a solid border around my table and between cells. I have tried with border styles for table, hd and td tags, but there seems to be some kind of space between the cell borders and also between the colored header cells and the table border. The cell-spacing is set to zero. How can I get the table to look nice, without the cells seperated by individual borders?
Thanks in advance!
MarteCare to post an example?Here is what I have in my stylesheet:
table {
padding: 0px;
border: 2px solid blue;
margin: 0px;
}
th {
background-color: blue;
color: white;
font-weight: bold;
text-align: center;
border: 2px solid blue;
}
td {
padding: 0px 3px 0px 3px;
text-align: left;
border: 2px solid blue;
}Hi,
This is probably the wrong way to do it (so i'll probably get told off) but if you want a quick and easy way to border your table just set the background colour of your table to the border colour that you want. Then set the td background colour to the cell colour you want.
<style type="text/css" media="screen">
<!--
table {
background-color: #0000FF;
}
td {
background-color: #FFFFFF;
}
-->
</style>
Hope this is of some use.
Paul... a more complete example (where's the table)?Hi,
I think the proper way to do it is to stick this in your table style:
border-collapse: collapse;
(not sure about support in older browsers though)
Hope this helps.
PaulThanks! I'll try both.
Marte
I need a solid border around my table and between cells. I have tried with border styles for table, hd and td tags, but there seems to be some kind of space between the cell borders and also between the colored header cells and the table border. The cell-spacing is set to zero. How can I get the table to look nice, without the cells seperated by individual borders?
Thanks in advance!
MarteCare to post an example?Here is what I have in my stylesheet:
table {
padding: 0px;
border: 2px solid blue;
margin: 0px;
}
th {
background-color: blue;
color: white;
font-weight: bold;
text-align: center;
border: 2px solid blue;
}
td {
padding: 0px 3px 0px 3px;
text-align: left;
border: 2px solid blue;
}Hi,
This is probably the wrong way to do it (so i'll probably get told off) but if you want a quick and easy way to border your table just set the background colour of your table to the border colour that you want. Then set the td background colour to the cell colour you want.
<style type="text/css" media="screen">
<!--
table {
background-color: #0000FF;
}
td {
background-color: #FFFFFF;
}
-->
</style>
Hope this is of some use.
Paul... a more complete example (where's the table)?Hi,
I think the proper way to do it is to stick this in your table style:
border-collapse: collapse;
(not sure about support in older browsers though)
Hope this helps.
PaulThanks! I'll try both.
Marte