Jump to content

Adding a background image?

Recommended Posts

Hello everyone

I have been trying and failing to add a background image to my web page via an external style sheet.

I used the following code:



body {
background-image: url(mywebpage/image.jpeg);


Could someone help me please and tell me where i've gone wrong.

Share this post

Link to post
Share on other sites

The link to image must be relative to external css file not the html page, the link to css file should be relative to the page. Depending on where you have placed the css file (css folder etc) will determine what the actual link should be.

Share this post

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.

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.


  • Create New...