Log in

View Full Version : Fixed button



luciffere
01-24-2009, 09:21 AM
Hello.
Please teach me how i can make a button in the left windows, middle position, but this button stay fixed always on top. If the page is scrooled, the button stay fixed?http://www.luciffere.ro/schita.jpg
Thank you.

Snookerman
01-24-2009, 09:54 AM
Add this to the style of the element you want to be fixed:

div#example {
position: fixed;
left: 50px;
top: 100px;
}
You can then change the values to place it where you want. IE6 has some problems with fixed positioning so if you really need it to work in IE6 as well you will need to use a hack, let me know and I'll teach you.

Good luck!