Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Getting specific images to stick with background on resize

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29950
    Hawk
    Member

    I’m very new to CSS, I’ve only designed webpages in HTML back in the late 90’s and early 2000’s.

    So now I have static background. And I’ve placed images and things in specific places.

    However, when you resize the browser or in a different resolution than I designed this in (1680×1050), the images are off-center or not aligned to the left portion of the grey background.

    View here: http://savingcontent.zymichost.com/test.html

    Is there a way to get specific images to stick with the left side of the background as it resizes so there isn’t the issue you see on the page?

    #81629
    virtual
    Participant

    That is because you are using position: fixed. Read this on css positioning
    http://www.w3schools.com/css/css_positioning.asp

    To get your background images to stay centered you will need to put all the elements of your site, e.g. header, navigation, content, footer, into a containing div say #wrapper, give it the width of your site and position center by using margin: 0 auto; Then you can attach the background images to their corresponding divs.

    #81644
    Hawk
    Member

    I finally got it resolved, thank for the tips! Quick response and great community.

    (You can see the result on the same page I reported as having a problem)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.