![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hi, I discovered recently, the hard way, that adding padding-right or padding-left to a <td> adds to the width of <td>!! |
|
so how do I add left- or right-padding to a <td> without adding to the width of it (short of putting a div inside each <td> and making it a specific width?) |
#3
| |||
| |||
|
|
maya wrote: hi, I discovered recently, the hard way, that adding padding-right or padding-left to a <td> adds to the width of <td>!! Yes, that's what it is supposed to do. Per the standards. so how do I add left- or right-padding to a <td> without adding to the width of it (short of putting a div inside each <td> and making it a specific width?) I'm not sure what you are trying to do, but my guess is that you want to increase the space between the cells without increasing the size of the block which is affected by the background colour, background image, etc. To do this you can specify (or increase) the TD's margin. HTH |
#4
| |||
| |||
|
|
C A Upsdell wrote: maya wrote: hi, I discovered recently, the hard way, that adding padding-right or padding-left to a <td> adds to the width of <td>!! Yes, that's what it is supposed to do. Per the standards. so how do I add left- or right-padding to a <td> without adding to the width of it (short of putting a div inside each <td> and making it a specific width?) I'm not sure what you are trying to do, but my guess is that you want to increase the space between the cells without increasing the size of the block which is affected by the background colour, background image, etc. To do this you can specify (or increase) the TD's margin. HTH td's margin? as in <td class="x" .x {margin-right:10px} ??? this will add PADDING????? |
|
I thought margin was for OUTSIDE ELEMENT (outside border whether visible or not..), padding for INSIDE ELEMENT.. |
#5
| |||
| |||
|
|
hi, I discovered recently, the hard way, that adding padding-right or padding-left to a <td> adds to the width of <td>!! |
|
so how do I add left- or right-padding to a <td> without adding to the width of it (short of putting a div inside each <td> and making it a specific width?) what's the point of "padding" property if instead of adding just the specified padding it WIDENS element you're applying padding to????? ![]() thank you... |
#6
| |||
| |||
|
|
maya wrote: [...] so how do I add left- or right-padding to a <td> without adding to the width of it (short of putting a div inside each <td> and making it a specific width?) I'm not sure what you are trying to do, but my guess is that you want to increase the space between the cells without increasing the size of the block which is affected by the background colour, background image, etc. To do this you can specify (or increase) the TD's margin. |
#7
| |||
| |||
|
|
On 2008-02-20, C A Upsdell <cupsd... (AT) upsdell (DOT) invalid> wrote: maya wrote: [...] so how do I add left- or right-padding to a <td> without adding to the width of it (short of putting a div inside each <td> and making it a specific width?) I'm not sure what you are trying to do, but my guess is that you want to increase the space between the cells without increasing the size of the block which is affected by the background colour, background image, etc. To do this you can specify (or increase) the TD's margin. Margin properties don't apply to elements that are display: table-cell (i.e. TDs usually). If you want gaps between the cells you set border-spacing on the table (or if you need support in IE use the cellspacing attribute instead). |
D
#8
| |||
| |||
|
|
On Feb 20, 1:51 pm, Ben C <spams... (AT) spam (DOT) eggs> wrote: |
|
U wanna add: border-collapse: separate; |
|
In IE u can: td#cell1{ position: relative; left: 10px; } Moves the cell. |
![]() |
| Thread Tools | |
| Display Modes | |
| |