![]() |
|
|
|
#1 |
|
i'm writing this only because i spent a good two days endlessly trying
to solve this problem and couldn't find anything on the internet that actually helped. I eventually figured out the solution, as no doubt so does everyone (hence the solution never actually being posted: it seems too obvious to bother)... but had i found it sooner, i would have been happy, so here goes: if you're trying to get a CSS div to span the total height of the window and scrolling is likely to be involved (for instance, a menu sidebar), don't use the height: 100% tag! set margin-top: 0px and margin-bottom:0px. jaschreiber@gmail.com |
|
|
|
|
#2 |
|
Posts: n/a
|
In article
< .com>, wrote: > i'm writing this only because i spent a good two days endlessly trying > to solve this problem and couldn't find anything on the internet that > actually helped. I eventually figured out the solution, as no doubt so > does everyone (hence the solution never actually being posted: it seems > too obvious to bother)... but had i found it sooner, i would have been > happy, so here goes: > > if you're trying to get a CSS div to span the total height of the > window and scrolling is likely to be involved (for instance, a menu > sidebar), don't use the height: 100% tag! set margin-top: 0px and > margin-bottom:0px. Why use any height at all? -- dorayme |
|
|
|
#3 |
|
Posts: n/a
|
wrote:
> i'm writing this only because i spent a good two days endlessly trying > to solve this problem and couldn't find anything on the internet that > actually helped. I eventually figured out the solution, as no doubt so > does everyone (hence the solution never actually being posted: it seems > too obvious to bother)... but had i found it sooner, i would have been > happy, so here goes: > > if you're trying to get a CSS div to span the total height of the > window and scrolling is likely to be involved (for instance, a menu > sidebar), don't use the height: 100% tag! set margin-top: 0px and > margin-bottom:0px. > Thank you. I was having problems like that, and also didn't get an answer on another news group. Now you've solved it for me. CM |
|
|
|
#4 |
|
Posts: n/a
|
To further the education of mankind, vouchsafed:
> i'm writing this only because i spent a good two days endlessly trying > to solve this problem and couldn't find anything on the internet that > actually helped. I eventually figured out the solution, as no doubt so > does everyone (hence the solution never actually being posted: it seems > too obvious to bother)... but had i found it sooner, i would have been > happy, so here goes: > > if you're trying to get a CSS div to span the total height of the > window and scrolling is likely to be involved (for instance, a menu > sidebar), don't use the height: 100% tag! set margin-top: 0px and > margin-bottom:0px. Hmm. What if you just don't want any horizontal margins on the div? -- Neredbojias Infinity has its limits. |
|