![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
On 2007-11-27, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: [...] Do you understand what I was saying about it being more than just according to standards but common sense that padding will increase height or width naturally and that height and width specifications cannot be thought to be max height and width. On this latter, here is another argument: suppose you tell an element which from its natural content would be say 200px tall, to be only 20px tall. What do you think should happen, what does happen? Unless it's a table cell, row or table, it should be exactly 20px tall and the content overflows. Usually you can still see it, but only because the overflow property is set to visible. In other words, height instructions are not king. There are other things that go on to temper and add and probably subtract. Apart from tables, you should always get exactly the height you ask for (measured between the top and bottom inside-padding edges). |
#12
| |||
| |||
|
|
In article <slrnfkq87e.mmc.spamspam (AT) bowser (DOT) marioworld>, [...] Heights are tricky customers in practice and there are some delicious counter-intuitive things that are nice to look at and get clear on: http://tinyurl.com/272lfm (this is not intended as any dispute with you or anyone, just a reminder to myself to make up an easy to remember story to think of these things as a hobby maybe over the Xmas break... <g> Just btw, MacIE and no doubt WinIE 6 are a bit more intuitively what you would expect on above url. I have not looked at Win, but MacIE is a tiny clue to me.) |
#13
| |||
| |||
|
|
On 2007-11-28, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: In article <slrnfkq87e.mmc.spamspam (AT) bowser (DOT) marioworld>, [...] Heights are tricky customers in practice and there are some delicious counter-intuitive things that are nice to look at and get clear on: http://tinyurl.com/272lfm (this is not intended as any dispute with you or anyone, just a reminder to myself to make up an easy to remember story to think of these things as a hobby maybe over the Xmas break... <g> Just btw, MacIE and no doubt WinIE 6 are a bit more intuitively what you would expect on above url. I have not looked at Win, but MacIE is a tiny clue to me.) The thing about heights is that they are completely different from widths. Normal-flow auto width depends only on the container and is greedy. Normal-flow auto height depends on the contents and is conservative. This is a big difference. |
|
Setting height explicitly is always going to be risky for any element that has contents, because they might not fit. Setting width explicitly is less risky because (in most cases) the contents will flow into the space available and just take up a bit more height as a result. Width is something a containing element dictates to its descendents anyway (so it's mostly OK to set it explicitly), but height is the other way round. The descendents determine how high the container needs to be, and it's best advised to listen to them. |
#14
| |||
| |||
|
|
In article <slrnfkrq11.mmc.spamspam (AT) bowser (DOT) marioworld>, Ben C <spamspam (AT) spam (DOT) eggs> wrote: [...] The thing about heights is that they are completely different from widths. Normal-flow auto width depends only on the container and is greedy. Normal-flow auto height depends on the contents and is conservative. This is a big difference. Yes. I take it that you mean that in, e.g., a <div>, the container itself is not auto width shrink to fit content but is auto height shrink to fit according to content. |
![]() |
| Thread Tools | |
| Display Modes | |
| |