in html you can write cellspacing=0, how do you deal with it with CSS? I have margin:0px;border:0px;padding:0px yet i still get spacing between cells... any help?Post your code, upload a copy of it, or post a link to it.You want something like thos for spacing:
border-collapse: separate; border-spacing: .5em
and like this for no spacing:
border-collapse: collapse
Browsers may not obay.
Here you go, have a good read.
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/tables.html#bordershttp://www.geocities.com/manhattanseniors/17thdegree/template.html">http://www.w3.org/TR/REC-CSS2/tables.ht ... plate.html</a><!-- m -->
This is the page i'm in the middle of updating to be valid with xhtml 1.0 strict. I figured out how to deal with cellspacing with css only. The only thing is that i checked the pagein NS7.0 and it looks bad. Looks fine in IE6.0 Any help?Images, Tables, and Mysterious Gaps
<!-- m --><a class="postlink" href="http://developer.netscape.com/evangelism/docs/articles/img-table/You">http://developer.netscape.com/evangelis ... -table/You</a><!-- m --> can fiddle my my simple code sample if you want, but remember Micro$oft is not very good at rendering CSS border-spacing.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Table Spacing</title>
<style type="text/css">
<!--
table {
width : 100%;
border : 1px solid red;
border-spacing : 50px;
padding : 25px;
}
td {
padding : 10px;
color : green;
border : 1px solid blue;
background-color: silver;
}
-->
</style>
</head>
<body>
<table>
<tr>
<td>A</td>
<td>B</td>
</tr>
<tr>
<td>X</td>
<td>Y</td>
</tr>
</table>
</body>
</html>Originally posted by thejoker101
This is the page i'm in the middle of updating to be valid with xhtml 1.0 strict
Auch, couldn't you have gotten rid of the tables too
Anyway, what I really wanted to say was, placing your Javascript in a comment might get you into trouble down the road. In XHTML/XML a comment really IS a comment...
You might as well learn to start placing all your JS linked externally (or simply not comment it at all, that's to work around v3 and older browsers?).
BTW, love your graphics I'm planning on getting rid of the tables once everything else is working properly. I tried earlier on to remove the tables and replace them with <div>'s and <span>'s but i had problems. Admittingly, it was a half-hearted effort, but still.
As you can probably tell, I really don't know much about xhtml. I've been doing most of my coding using html 4.1 strict, but for my newest endeavour decided to go to xhtml 1.0 strict.
Stefan, thanks for your comment about externally linking the javascript. I never really thought about doing it before, but actually it's quite applicable for this website.
And thanks for the comment about the graphics, hopefully it wasn't sarcasm.Originally posted by thejoker101
And thanks for the comment about the graphics, hopefully it wasn't sarcasm. [/B]
It wasn't Well thanks again. I don't really see anything particularly interresting about them, but they work for me. And, seeing how i'm not graphics designer, i was quite happy with them coming out the way they did.
border-collapse: separate; border-spacing: .5em
and like this for no spacing:
border-collapse: collapse
Browsers may not obay.
Here you go, have a good read.
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/tables.html#bordershttp://www.geocities.com/manhattanseniors/17thdegree/template.html">http://www.w3.org/TR/REC-CSS2/tables.ht ... plate.html</a><!-- m -->
This is the page i'm in the middle of updating to be valid with xhtml 1.0 strict. I figured out how to deal with cellspacing with css only. The only thing is that i checked the pagein NS7.0 and it looks bad. Looks fine in IE6.0 Any help?Images, Tables, and Mysterious Gaps
<!-- m --><a class="postlink" href="http://developer.netscape.com/evangelism/docs/articles/img-table/You">http://developer.netscape.com/evangelis ... -table/You</a><!-- m --> can fiddle my my simple code sample if you want, but remember Micro$oft is not very good at rendering CSS border-spacing.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Table Spacing</title>
<style type="text/css">
<!--
table {
width : 100%;
border : 1px solid red;
border-spacing : 50px;
padding : 25px;
}
td {
padding : 10px;
color : green;
border : 1px solid blue;
background-color: silver;
}
-->
</style>
</head>
<body>
<table>
<tr>
<td>A</td>
<td>B</td>
</tr>
<tr>
<td>X</td>
<td>Y</td>
</tr>
</table>
</body>
</html>Originally posted by thejoker101
This is the page i'm in the middle of updating to be valid with xhtml 1.0 strict
Auch, couldn't you have gotten rid of the tables too
Anyway, what I really wanted to say was, placing your Javascript in a comment might get you into trouble down the road. In XHTML/XML a comment really IS a comment...
You might as well learn to start placing all your JS linked externally (or simply not comment it at all, that's to work around v3 and older browsers?).
BTW, love your graphics I'm planning on getting rid of the tables once everything else is working properly. I tried earlier on to remove the tables and replace them with <div>'s and <span>'s but i had problems. Admittingly, it was a half-hearted effort, but still.
As you can probably tell, I really don't know much about xhtml. I've been doing most of my coding using html 4.1 strict, but for my newest endeavour decided to go to xhtml 1.0 strict.
Stefan, thanks for your comment about externally linking the javascript. I never really thought about doing it before, but actually it's quite applicable for this website.
And thanks for the comment about the graphics, hopefully it wasn't sarcasm.Originally posted by thejoker101
And thanks for the comment about the graphics, hopefully it wasn't sarcasm. [/B]
It wasn't Well thanks again. I don't really see anything particularly interresting about them, but they work for me. And, seeing how i'm not graphics designer, i was quite happy with them coming out the way they did.