Reputation: 189
I have a div on my site and in this div i want embedd a background-image. The problem is now, i cant see the picture. How can i see the picture? I cant finde my mistake. If i embedd the picture in the HTML Code it works, but not in the css Code. Because i want to create something like that: Page(The image + scroll)
Here is my Page: Page
*{
font-family: "Open Sans";
margin: 0px;
padding: 0px;
font-size: 18px;
}
body{
/*background: url("images/bg.png") repeat-x scroll left top #9EB5D6;
background: url("images/bg2.png"); */
}
nav{
background: url("images/line-header.png") repeat-x scroll center bottom #4A525A;
padding: 15px;
}
nav > ul{
margin: 0px;
padding: 0px;
text-align: center;
}
nav ul > li{
margin-left: 25px;
display: inline-block;
list-style-type: none;
}
nav ul li > a{
display: block;
text-decoration: none;
color: black;
color: #697683;
transition: color 0.5s;
}
nav ul li > a:hover{
color: #FFF;
}
.pic1 {
background: url(images/banner.jpg);
background-size: 100% 100%;
}
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="index.css" >
<!-- Open Sans -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
</head>
<body>
<nav>
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 1</a></li>
</ul>
</nav>
<div class="pic1">
</div>
</body>
</html>
Upvotes: 0
Views: 65