Reputation: 21
I need my header and side bar to stay in place, but I also need to scroll down on the page. I'm using fixed positioning, is there another way to do this?
Upvotes: 2
Views: 13942
Reputation: 16170
It looks like your problem was in your HTML, not your CSS. The <body>
tag should encompass all of your content. and don't forget to close your <div></div>
. I also moved your body background into the css, try to avoid using inline styles unless you really have to.
<head>
<Title>About Me!</title>
<link type="text/css" rel="stylesheet" href="aboutme.css" />
</head>
<body>
<div id="header"></div>
<div class="left"></div>
</body>
</html>
Upvotes: 0
Reputation: 6105
Add this position:fixed;
to your style of parts which you want to stay in fix !
Or
Reference this link !
Upvotes: 3
Reputation: 490
You can put your content in an iframe and the header and sidebar can be in the top. In this way. You can set the overflow for the iframe element. Probably this could help you out with your requirement
Upvotes: 0