Forums

How can I make the post content only scroll over the page (3 posts)

  1. jDesignSphere
    Member
    Posted 1 year ago #

    Hello,

    I am wanting everything inside the container (where the posts are located) to scroll while the background image inside the wrapper stays fixed (including the sidebar). I know about the position: fixed attribute, but I seem to be having trouble with it, it's making everything fixed which I can understand since the container is inside the wrapper. In this case, how to I do this? I know there is another style that will make an element fixed but I can't remember what it is. I am using the Thematic 0.9.7.7 theme.

    My page contains these main html elements in order (incase it helps, my site is on my local machine so I can't provide a link yet):

    <body>
    <header></header>
    <main>
    <container>
    <content></content>
    </container>
    <sidebar></sidebar>
    </main>
    <footer></footer>
    </body>
  2. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Assign overflow:scroll to the element you want to scroll.

    Gives a scroll bar though.... kind of yuk....

    http://thevoodooempire.com/blog.php
    is an example

  3. jDesignSphere
    Member
    Posted 1 year ago #

    Yeah, I know what you mean. I actually almost had what I wanted by applying the background-attachment:fixed attribute to the wrapper. It is keeping the background fixed so that I can just scroll the content. But it's not quite there. The length of the content exceeds the length of the page, so as it scrolls up for some reason, the body bg color scrolls up with it and cuts off the fixed background image. But the lengthy content is why I wanted to include the fixed background with the scrollable content. Otherwise, as the user scrolls they see the page end while the content keeps going.

    Do you or anyone know how to make it so the body background color doesn't cut off the background image as it scrolls up?

Topic Closed

This topic has been closed to new replies.

About this Topic