Grow your CSS skills. Land your dream job.

window resize background on right hand side to not come across into content area?

  • # March 27, 2013 at 8:32 am

    Hi all!
    I know this “should” be simple! but for some reason it’s seriously stumping me!
    I’m trying to get a background image to sit to the right of a 960px width container and not move across under the content area when the user’s window is smaller.

    But without putting scrollbars in place. At present the absolute div adds horizontal scrollbars when the window is resized smaller.

    I’ve tried fixed positioning and the like but it has me a little stumped! any help would be awesome!

    or alternatively if it could be positioned bottom right and just hide if the browser window is resized down?

    http://codepen.io/anon/pen/Dilrb

    # March 27, 2013 at 9:07 am

    Do you mean that the bg image is **inside** your 960px container but is on the right-hand side or is sitting outside of the container on the right?

    Here is the former: http://codepen.io/Paulie-D/pen/tHxiz

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".