cellpadding - css

J

Jan Faerber

why is <table cellpadding="0"> and <table style="cellpadding:0;"> not the
same? There is a little 1px margin with css between the table border and an
image. Are there more such differences?
 
S

Sid Ismail

On Tue, 07 Dec 2004 12:22:54 GMT, Jan Faerber

: why is <table cellpadding="0"> and <table style="cellpadding:0;"> not the
: same? There is a little 1px margin with css between the table border and an
: image. Are there more such differences?


Whatever you put into the quotes when using "styles" must conform to the CSS
specifications. cellpadding isn't one of them, but padding is. BTW, do you
want to set the padding for the table or the td's??

http://www.w3schools.com/css/css_reference.asp

Sid
 
J

Jan Faerber

Sid said:
On Tue, 07 Dec 2004 12:22:54 GMT, Jan Faerber

: why is <table cellpadding="0"> and <table style="cellpadding:0;"> not
: the same? There is a little 1px margin with css between the table border
: and an image. Are there more such differences?


Whatever you put into the quotes when using "styles" must conform to the
CSS
specifications. cellpadding isn't one of them, but padding is. BTW, do
you want to set the padding for the table or the td's??

http://www.w3schools.com/css/css_reference.asp

Sid

When I was transforming the file from the posing 'Controlling the height of
a div?' you have a banner on the top. So you need one big table with one
<td>, an inner-table in that <td> - I found that element now on
http://www.w3.org/TR/REC-CSS2/tables.html - for that inner table a <tr> and
a <td><img src=...">. The surounding table must not have a gap between its
double border and the pic. So I got a lot to read ... thx ... but I have to
go now.
 
M

Michael Fesser

.oO(Jan Faerber)
why is <table cellpadding="0"> and <table style="cellpadding:0;"> not the
same?

There's no such property in CSS.
There is a little 1px margin with css between the table border and an
image. Are there more such differences?

HTML:

<table cellspacing="0" cellpadding="0">

The same with CSS:

table {border-spacing: 0}
table td {padding: 0}

Micha
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top