Forums

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

Home Forums CSS HELP, trying to use full image background but it keeps over stretching….

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #36351
    gmg61610
    Member

    Hi im new and maybe dumb but I have tried to google this issue for hours, I’m trying to use an image I modified in photoshop for the background of my website but it wont use the whole photo, the photo keeps getting cut off in every direction. I was wondering if anyone had any idea of how to help me? I’ve tried resizing the photo in photoshop and it doesn’t seem to help, any advice would be greatly appreciated

    Here is the code i used from this site

    html {
    background: url(images/background.gif) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    }
    #95582
    TheDoc
    Member

    What do you mean it’s getting cut off? Unless the image is the *exact* dimension of your browser, there’s always going to be some part of the image that is cut off.

    #95583
    gmg61610
    Member

    the picture is a beach with a palm tree and its as if the code zooms in on the picture and all I can see is palm tree, the rest of the picture does not show up in safari or firefox, the comments on the code seemed to have worked for a good amount of people and even for Chris in his example….sorry if im not making sense, im very new to this

    #95594
    TheDoc
    Member

    Why don’t you send us a link? Are you viewing it on a large monitor?

    Like @marcdefiant alluded to, it’s not going to stretch or contract the image because that would distort it.

    #95839
    gmg61610
    Member

    thanks for everyone’s help, marcdefiant’s link helped me out! really appreciate it guys thanks again!!!

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