What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

Issues with background (finally figured out)

Huwey

New member
I am trying to use background-image and it is just not working at all for me. No image is showing up. I have the image now in the same folder as the html file (css is currently being embedded into the html file) and also in a folder named images

I have tried both of these approaches and it doesn't work. Please help
body {
margin: 2em;
font: 16px -apple-system, sans-serif;
line-height: 1.333em;<br>
background-image: url("../images/animated_cow.gif");

}

and

body {
margin: 2em;
font: 16px -apple-system, sans-serif;
line-height: 1.333em;<br>
background-image: url("animated_cow.gif");

}
 
Back
Top