Debt Consolidation - Prefessional Book Reviews - Buy WoW Gold - Credit Cards - Wordpress Themes

PDA

View Full Version : Something like Static DIV


greatlogix
Jun 18th 2007, 11:08 pm
Friends please visit http://www.sitepoint.com/. If you are first time at the site than you can view a advertisement bar at the bottom of the page. If you scroll page up and down this advertisement bar will not change its position. How can we do this using DIV or javascript.

Waiting for good replies.

krt
Jun 18th 2007, 11:16 pm
Fix it to the bottom using bottom: 0; and use fixed position, position: fixed and finally, add a z-index

#ad {
bottom: 0px;
position: fixed;
width: 100%;
z-index: 3;
}

edit: IE doesn't support position: fixed, see:
http://www.divinentd.com/experiments/emulating-position-fixed.html

greatlogix
Jun 18th 2007, 11:34 pm
nope. It's not working. :mad:

krt
Jun 18th 2007, 11:42 pm
http://www.divinentd.com/experiments/emulating-position-fixed.html

greatlogix
Jun 18th 2007, 11:52 pm
hmmmm. I thought there will be lot of java script involve in it but it seems its all about CSS. krt thanks for link. Its working in IE only.

krt
Jun 18th 2007, 11:55 pm
hmmmm. I thought there will be lot of java script involve in it but it seems its all about CSS. krt thanks for link. Its working in IE only.
What is? Your implementation or the one on the site?

Did you read the info about limitations, particularly the last paragraph?

greatlogix
Jun 19th 2007, 12:04 am
oh. got it. Now I read this para. I will try to play with the code and try to fix for my needs. Thanks again

rays
Jun 19th 2007, 2:11 am
sitepoint.com is down