| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
____________
Join Date: Oct 2003
Location: here.
Posts: 150
|
Fixed div
How do I make a div to stay fixed so it doesn't scroll with the rest of the page? Just like a fixed bground... Tried the position:fixed value inline, but it will place the div bottom right, and I want it where it is right now (the top left logo) -> http://monterosfg.eresmas.net Coding sucks, things should be made with our minds. 21st Century's full of shit for the time being... And where's my flying car?! __________________
|
|
|
|
|
|
#2 (permalink) |
|
trouble free and loverlee
Join Date: Mar 2003
Location: YooKay
Posts: 2,968
|
Using position: fixed; top: Xpx; left: Xpx; is the correct method, but you'll need to read up on the workarounds for MSIE/Win's crappy support for position: fixed; http://www.howtocreate.co.uk/fixedPosition.html http://rooster.stanford.edu/~ben/not...ring/cssie.php I'm not even sure if the workaround is a compromise or if it creates the full, desired effect as I've not had to look into it for any of my own jobs. I just know that there is a workaround that 'helps'. Also, place the logo div markup as the first element in your body. Without proper support, MSIE/Win is simply rendering the element in a relative position according to its place in the markup. Using the workaround should mean you can place it anywhere in the markup, but it's also genealy better to have logos close to the top of your body markup (along with proper alt attibutes + sundry accessibility doodads) as this means that the company name will appear at the top and help identify your page more clearly if/when css is not supported. btw, that's one hateful design you're using there. Are you affiliated with any opticians? You should be. |
|
|
|
#4 (permalink) | |
|
____________
Join Date: Oct 2003
Location: here.
Posts: 150
|
Quote:
Whoohoo!!!!!!!!!!!!!!!!!!!!! __________________
|
|
|
![]() |