Log in

View Full Version : how to add style for border for all tables border?



toplisek
05-17-2007, 03:49 PM
I have code like: <table border="1" style="border-color:#EDECE6;" cellspacing="0" align="left">

I woudl like to add colour tha same for all table border.
Now is seen only on outside border.

How to do it?

Spiritvn
05-17-2007, 03:53 PM
CSS:



table {
border: #EDECE6 solid 1px;
}


remove the border="1" on HTML just use:


<table cellspacing="0" align="left">
</table>

mwinter
05-17-2007, 03:54 PM
I have code like: <table border="1" style="border-color:#EDECE6;" cellspacing="0" align="left">

Remove the deprecated attributes border and align, and use only CSS instead.



I woudl like to add colour tha same for all table border.
Now is seen only on outside border.

How to do it?

Add borders to the table cells.

toplisek
05-17-2007, 04:01 PM
CSS:



table {
border: #EDECE6 solid 1px;
}


remove the border="1" on HTML just use:


<table cellspacing="0" align="left">
</table>


If I do this it will not show border any more. Is there some solution or wrong?

Spiritvn
05-17-2007, 04:07 PM
If I do this it will not show border any more. Is there some solution or wrong?

i had tested and it works -.-

or u can try other way:



.border {
border: #EDECE6 solid 1px;
}




<table class="border" cellspacing="0" align="left">
</table>