Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1182
  • Last Modified:

fixed div even when page is scrolling

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
ChekKus
Asked:
ChekKus
  • 3
  • 2
1 Solution
 
ahmad2121Commented:
example:


div
{
 bottom:10px;
 left:0;
 position:fixed;
}

Open in new window

0
 
ChekKusAuthor Commented:
seems like this will keep the div in fixed position. But, it does not scroll the div when I scroll the page.
0
 
ahmad2121Commented:
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
 
ChekKusAuthor Commented:
<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
 
ChekKusAuthor Commented:
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

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!

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