Reputation: 13
Can someone please tell me why this is not working? I have tried both background-image and background. Also tried different height and width attributes.
<html>
<head>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<div class="wtd-intro-left"><span></span></div>
</body>
</html>
And here is the CSS
.wtd-intro-left {
background: url("http://etc.usf.edu/presentations/extras/letters/fridge_magnets/red/11/a-300.png") no-repeat;
width:430px;
height:366px;
display: block;
}
Upvotes: 0
Views: 230
Reputation: 1
Works fine here also - see the second answer to make sure you have the css in the proper folder - Thanks - Michael
Why is the "span" in the css for that line?
Upvotes: 0
Reputation: 3149
Here worked. Certify that the .CSS file is inside folder called "css" - because is where the html is searching to load ...
href="css/style.css"
Upvotes: 1
Reputation: 541
Edit: when i copy+pasted, the dashes got smashed together. all i did was fix that. See if that is the error. Also, since you did not include the css from the rest of the style sheet, it could be that you have a conflicting style on the parenting div or the element itself, not being shown in your question. https://jsfiddle.net/829fk6gm/
.wtd-intro-left {
background: url("http://etc.usf.edu/presentations/extras/letters/fridge_magnets/red/11/a-300.png") no-repeat;
width:430px;
height:366px;
display: block;
}
Upvotes: 0