Click to See Complete Forum and Search --> : How to make position:fixed


mrtblt
04-15-2008, 07:09 PM
Here is part of my css code



#cracks1

{

position: relative;

z-index: 1;

min-width: 860px;

height: 542px;

margin-bottom: -542px;

background-image: url(images/cracks1.gif);

background-repeat: no-repeat;

}






#cracks2

{

position: fixed;

z-index: 1;

min-width: 860px;

height: 647px;

margin-bottom: -647px;

background-image: url(images/cracks2.gif);

background-repeat: no-repeat;

background-position: 100% 8px;

}



and link of my site is http://www.kumyapi.com.tr/index.php

those divs which i gave css codes seem to be fluid. As i resize the window, their position changes. So how may i make them fixed?

You can see page source on the link provided above

smyhre
04-16-2008, 09:35 AM
Are you testing it is ie and that is what is giving you the problem of the fixed position? IE doesn't like fixed position but you can make it respect it by using {position: fixed !important;} I think that is all you need someone please correct me if I am wrong. I don't use fixed positions much so I forget sometimes.

drhowarddrfine
04-16-2008, 01:14 PM
Position:fixed just doesn't work at all in IE6. It does in IE7 but is buggy.

WebJoel
04-16-2008, 01:18 PM
There are javscript helpers, and non-javascript 'hacks' to help make IE do position:fixed;
http://tagsoup.com/cookbook/css/fixed/