-2

i have got 2 divs

<div id="first"></div>
<div id="second"></div>
#first
{
float:left;
width: 150px;
height: 100%;
position: fixed;

}
#second
{
float:left;
width: 1000px;
height: 100%;
}

when i zoom in page and scroll it right. 1st div will be above 2nd. How can i keep it fixed but not let it get above other divs?; (i want to make it fixed for scroll up/down, but not left/right)

GroD
  • 104
  • 1
  • 9
  • I don't get your idea. You are making the div fixed, but you don't want it to be fixed... Please provide more information. – drip Feb 15 '15 at 17:10
  • Note that `float` has no effect on fixed elements –  Feb 15 '15 at 18:28

1 Answers1

0

I believe you can find your answer within this fiddle: http://fiddle.jshell.net/zoc053dh/

And for a detailed explanation see this link: z-index not working with fixed positioning

You are having trouble understanding the principles of position (relative, fixed, absolute etc.) and z-index.

Cheers, Please mark this answer as correct if this is the answer you were looking for.

Community
  • 1
  • 1
Alex
  • 357
  • 1
  • 12