Solved

how to keep a div at a fixed position when scrolling

Posted on 2010-09-16
4
799 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

688 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