Jump to content

CSS stylesheet not working properly


cristi

Recommended Posts

Hello everybody!

I use  > background: url("images/background-forum.jpg"); < inside the body of the css stylesheet, but no background image is added, but when I do this in HTML > <body background="images/background-forum.jpg"> < it works, 

the structure.css is in the same folder as index.html and the one with all the images called " images ".

I use sublime text 3, someone can help me out?

Link to comment
Share on other sites

55 minutes ago, DavidCampbell said:

your style sheet should not have this syntax: 

 


<style>
  
</style>

 

just do it like this:

 


body
	{
	background: url("images/background-forum.jpg");
	}

and include it in your html head:

 


<link href="pathTo/style.css" media="all" rel="stylesheet" type="text/css">

 

 

Thanks, after all it was the <style> included in the stylesheet, like you said.

Solved.

  • Like 2
Link to comment
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...