CSS on Tables!?
- Started
- Last post
- 4 Responses
- MMe
How do I add a cellspace to my tables with a Stylesheet!?
I want to be able to have a cellspace value of 1, i html:but can this be done in my stylesheet?
advice please...
:P
- sp0
if you are using tables, why not use the cellspace in the table tag?
if you want to use a stylesheet to define layout [which is the proper way] then use div's and using padding and margins, along with positioning, to set your "cell".
- MMe0
hehe... no the content gets generated from PHP into HTML (sort of logfiles that our php server converts to standard html) and these files already has a css stylesheet linked to them, cellcolor etc...
Im sure this is something the php-files can generate, cu'z what it does now, its to give the tables standard values=null (looks like cellspace 2)
Thanks for your advice...
*im no wizkid when it comes to php, hehe...*
- sp0
hm. oh, well that does change things a bit.
you could just assign padding to each cell in the css.
but, you may still need to insert a class into the table or td tag.
so, either way, something in the way php echos out html needs to be changed.
you could do:
table class="x"
and your css would look like:
.x {
bla bla css
}
.x td {
padding: 2px;
}
or something - if the board even shows the code.
- lefteris0
Try
border-spacing: 1px;
and/or
border-collapse:collapse
with proper values to get the desired result.
Note that this works only with CSS 2 compatible browsers.
To enforce compatibilty use the !DOCTYPE directive.