views:

343

answers:

2

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
I can't get a better demonstration than this.Example helped very much...Thank you..............
Sijo
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
usually am using external css page only..Just for easy use and testing am using style="......" . thanks
Sijo
Ahh I see, that makes sense :) Good luck with the Development
Alex
+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
Please post comments as comments by `add comment` link. Please post updates to questions by `edit` link below the question. You should not post comments, questions or updates as answers ;)
BalusC
Sorry.. I will follow these rules now onwards....
Sijo