Solved

fixed div even when page is scrolling

Posted on 2009-07-10
5
1,134 Views
Last Modified: 2013-11-19
I have a asp page where I need to create a fixed div to show some static content on the right side of the page. I want this to be seen even when users are scrolling over the page so that this div stays in same position.  
0
Comment
Question by:ChekKus
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:ahmad2121
ID: 24825645
example:



div

{

 bottom:10px;

 left:0;

 position:fixed;

}

Open in new window

0
 

Author Comment

by:ChekKus
ID: 24825674
seems like this will keep the div in fixed position. But, it does not scroll the div when I scroll the page.
0
 
LVL 6

Expert Comment

by:ahmad2121
ID: 24825817
What? I am doing this right now in my browser and the div stays on the page exactly where i have it. it never disappears from the page. Isn't this what you want?
0
 

Author Comment

by:ChekKus
ID: 24826071
<html>
<head>
    <title>test</title>
</head>
<body>
    <table width="1024" style="height: 1024;" border="1">
        <tr>
            <td style="width: 60%;">
                <h2>
                    This is a fixed text</h2>
            </td>
            <td style="width: 40%;">
                <div style="bottom: 10px; left: 0; position: fixed; text-align:center;">
                    this is the text that should be there even if the page scrolls at the fixed position. kind of like a floating div</div>
            </td>
        </tr>
    </table>
</body>
</html>
0
 

Accepted Solution

by:
ChekKus earned 0 total points
ID: 24880836
I am looking for something like this.

http://www.microsoft.com/click/thrivedev/Enhance/WebDevelopment/

if you check the right side, the "web development" box remains in same position even when the page is scrolled. any idea how can we do this?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn how to dynamically set the form action using jQuery.

759 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now