I have a toolbar div in my IUI. I want to fix the position of toolbar without scrolling. How can I do this ? please help me.
+4
A:
use position: fixed
in CSS
refer to: http://www.digital-web.com/extras/positioning_101/css_positioning_example.php I always refer back as it's got a lot of good info on positioning in CSS...
you could use something like:
div#toolbar
{
height: 6em;
left: 0px;
position: fixed;
top: 0px;
width: 100%;
z-index: 1;
}
Alex
2010-01-21 13:06:46
I can't get a better demonstration than this.Example helped very much...Thank you..............
Sijo
2010-01-21 13:50:44
Glad I could help :) I noticed you're specifying CSS in-line and not from an external CSS page. Check out http://www.w3schools.com/css/css_howto.asp as it might make your life easier using an external file
Alex
2010-01-21 17:44:48
usually am using external css page only..Just for easy use and testing am using style="......" . thanks
Sijo
2010-01-22 05:47:52
Ahh I see, that makes sense :) Good luck with the Development
Alex
2010-01-22 09:57:21
+1
A:
I got perfect result with the help of that link..
I did
For first div
style="position:fixed;left:0px;top:0px;width:100%;z-index:-1;"
and for second div
style="z-index:-2;"
So toolbar remains at top always....and rest of the content will only scroll..
It works fine in safari and firefox.....Thank u alex..
Sijo
2010-01-21 14:25:23