![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
div.bla { position : absolute; left : 0px; top : 72px; height : 18px; width : 100%; padding-left : 330px; } Can anyone help me get rid of that scrollbar? |
#3
| |||
| |||
|
|
Hello Newsgroup I'm trying to have a div which fills the whole width of the browser window. |
|
I want to have a link in that div (like "sitemap"). That word should start 330px from the left side. The following code worked, but I get a horizontal scrollbar. The div is too wide... div.bla { position : absolute; left : 0px; top : 72px; height : 18px; width : 100%; padding-left : 330px; } Well, width = padding + margins + borders + content so... |
#4
| ||||
| ||||
|
|
Does it have to be absolutely positioned? |
|
If it's taking up 100% of the width & it's at the top, why not just put it first in the html & use: |
|
body {padding: 0; margin: 0;} div#bla {margin-top: 72px; padding-left: 330px; height: 18px;} |
|
I take it your trying to fit the div to a picture & hence the need for px? |
#5
| |||
| |||
|
|
Absolute: Goes where you put it. Other things ignore its presence. Relative: Leave a hole where it would have been & shift the contents as specified. Other non-absolutely positioned things move out of the way of the hole. Static: the normal default. |
#6
| |||
| |||
|
|
Absolute: Goes where you put it. Other things ignore its presence. Relative: Leave a hole where it would have been & shift the contents as specified. Other non-absolutely positioned things move out of the way of the hole. Static: the normal default. |
|
body {padding: 0; margin: 0;} div#bla {margin-top: 72px; padding-left: 330px; height: 18px;} I want this div to be like a horizontal bar across the whole window. That's what the css I gave does. Try it out. |
#7
| |||
| |||
|
|
"Jacqui or (maybe) Pete" <porjes (AT) spamcop (DOT) net> schrieb im Newsbeitrag news:MPG.1970f871a2e939f2989bed (AT) news (DOT) CIS.DFN.DE... .... body {padding: 0; margin: 0;} div#bla {margin-top: 72px; padding-left: 330px; height: 18px;} I want this div to be like a horizontal bar across the whole window. That's what the css I gave does. Try it out. I did and it works exactly how I want it to! Thanks... You're welcome. |
![]() |
| Thread Tools | |
| Display Modes | |
| |