Solved

how to keep a div at a fixed position when scrolling

Posted on 2010-09-16
4
797 Views
Last Modified: 2012-05-10
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
Comment
Question by:eMisc
  • 2
4 Comments
 

Expert Comment

by:Baxta
ID: 33692867
In css file:

#divname{position:fixed;margin:0;top:0;}
0
 
LVL 25

Expert Comment

by:Luis Pérez
ID: 33692939
Take a look at this:

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

Hope that helps.
0
 

Author Comment

by:eMisc
ID: 33693362
none of them works on iphone safari
0
 

Accepted Solution

by:
eMisc earned 0 total points
ID: 33694191
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question