Hi, I think you should do this:
CSS
#navcontainer { position:fixed; background:red; left:0; right:0; top:0; height:100px; z-index:3; } .city { position:relative; background:green; left:0; right:0; padding:10px; top:100px; z-index:2; } .city .text { padding:10px; background:yellow; }β
HTML
<div id="navcontainer">This is navigation</div> <div class="city"> <div class="text">here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br />here text <br /></div> </div>β
Live demo http://jsfiddle.net/xLnKN/1/
Rohit azad
source share