FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

CSS - Sidebar and background fixed, Content scrolling

 


Cedar Speeder
Hello,

I've been working with CSS to build a page with fixed background and sidebar, but a scrolling main page:

_____________________________________
| ________ _______________________ |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | fixed | | scrolling | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| |_______| |______________________| |
|________fixed background______________|

Any advice to help me find the specific tools I need would be very much appreciated.

Alex
Cedar Speeder
That didn't really format as planned, but hopfully it still makes sense from the description...
alalex
nt really get what you mean, could you make a picture, even with paint or something and post it here?
Cedar Speeder
Hey thanks for the reply. Basically the left side of the screen there is a sidebar for links, and then there's the content on the right. My aim is to have only the content scroll and the sidebar stay where it is despite scrolling.

So: Fixed sidebar frame, scrolling content frame.

Does that make more sense?
jabapyth
you could do frames, or go the CSS way! put the sidebar in a <div class="sidebar"> and put
Code:
div.sidebar {
position:absolute;
top:10;
left:10; // change these to suit your preferences
}

as for the fixed background, use
Code:

body {
   background-image: url(mybackgroundimg.png);
   background-attachment: fixed;
}


Hope this helps Smile
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.