![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
This is in spite of 100% width for a P being default. |
#2
| |||
| |||
|
|
On 2009-03-31, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: [...] This is in spite of 100% width for a P being default. I know what you mean, but it's not strictly accurate. The initial value of width is "auto", which is not the same as "100%". Width: auto makes the P's margin box fill its container, width: 100% makes its content box width equal to the containing width. They result in the same "used width" as the spec calls it only if the P has zero for all its horizontal borders, padding and margins (which it would unless someone set them otherwise). |
#3
| |||
| |||
|
|
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in news:doraymeRidThis-77778C.09311301042009 (AT) news (DOT) albasani.net... Adding width: auto, does *not* trigger P to grow height in IE, it needs an explicit width. 100% will usually do you. But if this runs foul of something else you are doing, given Ben's point here, you can make do with less than 100%. For example if your borders and paddings are causing the P to get cut off, just lower the percentage of width, and this will usually achieve your main aim with little loss of function. I added a height:100% and that fixed it and did not affect other browsers. thanks to all. |
![]() |
| Thread Tools | |
| Display Modes | |
| |