wasi.cjr Posted August 3, 2011 Report Posted August 3, 2011 hi, I am using ruby on rails to build a website. I want to have a full screen background image. After spending a lot of time searching on google, i tried this in my css file: body { background: url(bgimage.jpg); } I got the image repeated all over the page. I just want the image to fit the entire web page. I don't want any repetition. any suggestion? Thanks, wasi Quote
Deva Posted August 3, 2011 Report Posted August 3, 2011 I got the image repeated all over the page. I just want the image to fit the entire web page. I don't want any repetition. any suggestion? I don't have a lot of experience with CSS but I usually just increase the size of the image. A larger image = less space for repetition Quote
newseed Posted August 3, 2011 Report Posted August 3, 2011 First off, how large is that image you are using? Secondly, add no-repeat to the end of your background property to stop it from repeating itself. Finally, trying to get a background image to fit within a framework of the web page is one thing but if you are trying to make it fit the full screen of whatever monitor/resolution size is a whole different issue altogether. Quote
wasi.cjr Posted August 3, 2011 Author Report Posted August 3, 2011 First off, how large is that image you are using? Secondly, add no-repeat to the end of your background property to stop it from repeating itself. Finally, trying to get a background image to fit within a framework of the web page is one thing but if you are trying to make it fit the full screen of whatever monitor/resolution size is a whole different issue altogether. Thanks for the reply. I am not sure as to what image i will be using. I want the background image to cover up the entire browser. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.