- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
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;
}
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.
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
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.
thanks for everyone’s help, marcdefiant’s link helped me out! really appreciate it guys thanks again!!!