• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 803
  • Last Modified:

how to keep a div at a fixed position when scrolling

Hello,
I need a div fixed on top of the screen, so when you scroll the page that div remains always visible at the top over the rest

I need it working on iPhone Safari, html, css and javascript are ok, imagine it just like a banner always visible

thank you
0
eMisc
Asked:
eMisc
  • 2
1 Solution
 
BaxtaCommented:
In css file:

#divname{position:fixed;margin:0;top:0;}
0
 
Luis PérezSoftware Architect in .NetCommented:
Take a look at this:

http://www.dynamicdrive.com/dynamicindex17/stayontop.htm

Hope that helps.
0
 
eMiscAuthor Commented:
none of them works on iphone safari
0
 
eMiscAuthor Commented:
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now