padding inside table

P

Paul Furman

How come this doesn't work for me? I tried all sorts of combinations and
the text inside the td's is smashed pretty tight to the edges by a
couple pixels or so. IE & Mozilla see nothing. Mozilla doesn't see the
background color but that's another issue. I want a little space between
the border and the text, that's padding, right?

Wrapping the contents in a div inside the td works
<div style="padding: 4px;">

this doesn't:
table.normal {
font-size: 8pt;
font-family: Arial;
background-color=#CCD8CD;
border=1px solid #aaaaaa;
border-collapse: collapse;
padding-left: 4px;
}
td.normal {
border=1px solid #aaaaaa;
padding: 4px;
}

<table class="normal" width="480px">
<tr>
<td align="left" class="normal">
text here
 
T

Toby A Inkster

Paul said:
table.normal {
font-size: 8pt;
font-family: Arial;
background-color=#CCD8CD;
border=1px solid #aaaaaa;
border-collapse: collapse;
padding-left: 4px;
}
td.normal {
border=1px solid #aaaaaa;
padding: 4px;
}

Get rid of the equals signs (=) and use colons :)) instead.
 
G

GD

Paul Furman said:
How come this doesn't work for me?
table.normal {
background-color=#CCD8CD;
border=1px solid #aaaaaa;
padding-left: 4px;
}
td.normal {
border=1px solid #aaaaaa;
}

Padding is for the cells, not the table itself, but the main problem
here is the typos. You've used equals signs in 3 of the properties.

The CSS validator would have spotted these ;)
http://jigsaw.w3.org/css-validator/
 
P

Paul Furman

GD said:
Padding is for the cells, not the table itself,


but the main problem here is the typos.
You've used equals signs in 3 of the properties.


Thanks I fixed that. And I've finally dumped it into a separate css file
so I won't have to run in circles to update leftover junk like that again.

The padding still doesn't work though.
 
P

Paul Furman

GD said:
Do you have an example URL? If you fixed the typo above the padding
property, I can't see anything else to stop it working.

OK, I uploaded this version with the div patch commented out:

http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=ecards.php
http://hills.ccsf.edu/~pfurma02/paul.css

and the relevant code:

<table class="normal" width="480px">
<tr>
<td align="left" class="normal">
<!-- <div style="padding: 4px;"> -->

Echivaria Topsy-turvey.<br>
<hr width=100%>
A selection of my favorite pictures taken in many locations
and sorted in no particular order. <!-- </div> -->
</td>
</tr>
</table>
 
P

Paul Furman

Paul said:


Oddly, it's maybe 2 pixels on the unix server at school and nearly
touching the border on my win2k apache server at home.

BTW, I've changed 'normal' to 'textbox'

Damn, now that overwrote whatever it was & they are both bad.


This is what was up a few minutes ago:

table.normal {
font-family: Arial;
background-color: #CCD8CD;
border: 1px solid #aaaaaa;
border-collapse: collapse;
}
td.normal {
border: 1px solid #aaaaaa;
padding: 4px;
}
 
P

Paul Furman

Paul said:
BTW, I've changed 'normal' to 'textbox'

Damn, now that overwrote whatever it was & they are both bad.

OK that was it, I had the names mixed up. Too many times back & forth.

Sorry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
Martindap

Latest Threads

Top