Jump to content
Killersites Forums

css background image


Recommended Posts

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

Link to post
Share on other sites

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...