Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > cellpadding - css

Reply
Thread Tools

cellpadding - css

 
 
Jan Faerber
Guest
Posts: n/a
 
      12-07-2004
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?




--
Jan

http://linux.janfaerber.com
 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      12-07-2004
Jan Faerber wrote:

> why is <table cellpadding="0"> and <table style="cellpadding:0;"> not the
> same?


Possibly because there is no such CSS property as cellpadding.
You should look at the table bit of the recommendation:

http://www.w3.org/TR/REC-CSS2/tables.html

--
Cheers
Richard.


 
Reply With Quote
 
 
 
 
Sid Ismail
Guest
Posts: n/a
 
      12-07-2004
On Tue, 07 Dec 2004 12:22:54 GMT, Jan Faerber
<jancfaerber_spider@monkey_hotmail.com> wrote:

: 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






 
Reply With Quote
 
Jan Faerber
Guest
Posts: n/a
 
      12-07-2004
Sid Ismail wrote:

> On Tue, 07 Dec 2004 12:22:54 GMT, Jan Faerber
> <jancfaerber_spider@monkey_hotmail.com> wrote:
>
> : 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.




--
Jan

http://linux.janfaerber.com
 
Reply With Quote
 
Michael Fesser
Guest
Posts: n/a
 
      12-08-2004
.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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CellPadding Uriah Piddle ASP .Net 0 03-08-2007 02:14 AM
cellspacing und cellpadding =?UTF-8?B?TWFydGluIFDDtnBwaW5n?= HTML 6 08-14-2005 10:36 AM
CSS equiv for cellspacing & cellpadding Todd Cary HTML 12 09-18-2004 08:37 PM
Possible to set table cellspacing; cellpadding in CSS? Gnarlodious HTML 2 04-10-2004 06:31 AM
Unwanted cellpadding in IE6 tables? Lorne Cameron HTML 9 06-27-2003 11:58 AM



Advertisments