- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I don’t know why the image is not showing up….
Any help?
This is the HTML Code
<div class="main">
<div id="logo">
<div class="jumbotron"></div>
</div>
</div>
This is the CSS Code
#logo{
background:url(background.jpg) no-repeat;
background-size:cover;
}
Can you make a demo in Codepen.io rather than just dumping some code?
https://codepen.io/anon/pen/YrbGBL
Here it is mate.
Assume that there is bootstrap file in it….
Ahhh…you are using the shorthand.
Just add the background-size as another line…
https://codepen.io/Paulie-D/pen/zEQowP
or
split the position/size keywords like position/size
Your background declaration should look like this:
background:url(https://i.ytimg.com/vi/n1sk-0k6ysc/maxresdefault.jpg) top left/cover no-repeat;