So I'm trying to format a simple table using CSS. Everything looks great with two problems. One, there is only a border around the whole table with whitespace dividing each cell. Second, the padding command doesn't do anything so my text is smashed up against what borders are there.
edit:
One other problem I just came across. When adding a 'body' class in and using background-color to apply a background color to the whole page, it only applies that color to the height of the table and not the whole page. What's up with that?
Here's what I have for the CSS:
I glanced through to make sure I wasn't missing any punctuation. What am I missing here?
Thanks for any help.
edit:
One other problem I just came across. When adding a 'body' class in and using background-color to apply a background color to the whole page, it only applies that color to the height of the table and not the whole page. What's up with that?
Here's what I have for the CSS:
Code:
table{width: 800px;
border: 1px solid black;
padding: 2px;
border-collapse: collapse;}
td.1{border: 1px solid black;
width: 200px;}
td.2{border: 1px solid black;
width: 360px;}
td.3{border: 1px solid black;
width: 240px;}
I glanced through to make sure I wasn't missing any punctuation. What am I missing here?
Thanks for any help.