![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I just found that for a table, the margin for <tr> and <td> are not honored, but the padding is... is this a widely known fact? why make this an exception for margin, i wonder. |
#3
| |||
| |||
|
|
I just found that for a table, the margin for <tr> and <td> are not honored, but the padding is... is this a widely known fact? why make this an exception for margin, i wonder. margin not honored: http://www.0011.com/test_table/index-margin.html |
#4
| |||
| |||
|
|
On Sun, 04 Nov 2007 13:11:00 -0000, Summercool wrote: I just found that for a table, the margin for <tr> and <td> are not honored, but the padding is... is this a widely known fact? Well it's clearly stated in the specification (http://www.w3.org/TR/CSS21/box.html#propdef-margin): 'margin' Value: <margin-width>{1,4} | inherit Initial: see individual properties Applies to: all elements except elements with table display types other than table-caption, table and inline-table |
#5
| |||
| |||
|
|
if my design needs a yellow padding, red border, and then blue margin? then i can't use margin on a <td> but have to rely on a div> to get the job done... ? |
|
i can use cellspacing except it is non-CSS and my work place kind of want everything to be CSS. They 'kind of' want this do they? Well, tell them that there are |
#6
| |||
| |||
|
|
In article 1194224608.674540.132... (AT) v23g2000prn (DOT) googlegroups.com>, Summercool <Summercooln... (AT) gmail (DOT) com> wrote: if my design needs a yellow padding, red border, and then blue margin? then i can't use margin on a <td> but have to rely on a div> to get the job done... ? Show us a single real live case where you *have* to have cellspacing and where padding on the td will not do. i can use cellspacing except it is non-CSS and my work place kind of want everything to be CSS. They 'kind of' want this do they? Well, tell them that there are still a few presentational things left in html which it is ok to use when there are not other methods at hand. |
#7
| |||
| |||
|
|
how about for http://www.0011.com/test_table/index3.html if i want blue 3px margin surrounding the black dashed border... hm... a few things left to format in HTML? the thought the idea of HTML and CSS is to totally separate text and format? |
#8
| |||
| |||
|
|
On Nov 4, 11:09 pm, Summercool wrote: how about for http://www.0011.com/test_table/index3.html if i want blue 3px margin surrounding the black dashed border... hm... a few things left to format in HTML? the thought the idea of HTML and CSS is to totally separate text and format? so <div> can do the job... http://www.0011.com/test_table/index5.html so margin is just spacing |
|
and cannot have graphics or background color huh? in order to make it have color, you will have to set the parent's color or set another div to enclose it. |
#9
| |||
| |||
|
|
On Nov 4, 5:58 pm, dorayme Summercool wrote: if my design needs a yellow padding, red border, and then blue margin? then i can't use margin on a <td> but have to rely on a div> to get the job done... ? Show us a single real live case where you *have* to have cellspacing and where padding on the td will not do. i can use cellspacing except it is non-CSS and my work place kind of want everything to be CSS. They 'kind of' want this do they? Well, tell them that there are still a few presentational things left in html which it is ok to use when there are not other methods at hand. how about for http://www.0011.com/test_table/index3.html if i want blue 3px margin surrounding the black dashed border... |
|
hm... a few things left to format in HTML? the thought the idea of HTML and CSS is to totally separate text and format? |
#10
| |||
| |||
|
|
On Nov 4, 11:09 pm, Summercool <Summercooln... (AT) gmail (DOT) com> wrote: how about for http://www.0011.com/test_table/index3.html if i want blue 3px margin surrounding the black dashed border... hm... a few things left to format in HTML? the thought the idea of HTML and CSS is to totally separate text and format? so <div> can do the job... http://www.0011.com/test_table/index5.html so margin is just spacing and cannot have graphics or background color huh? in order to make it have color, you will have to set the parent's color or set another div to enclose it. |
![]() |
| Thread Tools | |
| Display Modes | |
| |