Reputation: 1
HTML:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="nav">
<ul>
<li><a href="#">Rooms</a></li>
<li><a href="#">Food</a></li>
<li><a href="#">Events</a></li>
<li><a href="#">Offers</a></li>
</ul>
</div>
<div class="jumbotron">
<h1> Welcome</h1>
<p>Enjoy your stay</p>
</div>
</body>
</html>
CSS:
.nav li{
color: #5a5a5a;
font-size: 11px;
font-weight: bold;
padding: 14px 10px;
text-transform: uppercase;
display:inline;
list-style-type:none;
}
.jumbotron{
background-image:url('http://4.bp.blogspot.com/-NPN-yWZyRIM/T4jMz_3o0SI/AAAAAAAAAAA/LGEgW7642Rs/s1600/Greenlake_Room-Greenlake-01-1061468546-O.jpg');
height:300px;
}
When using notepad++, my list and background image do not appear when i click run on any internet browser. Please help I am a beginner.
Upvotes: 0
Views: 2968
Reputation: 659
Your code is perfect, just make sure that you have saved the file as an HTML file before running it and ensure that the CSS is saved in the correct location, in your case, in the same location where your html is saved. Also, it would be better to download the image to your local PC as this will load the site faster as it does not have to go and fetch the image
Upvotes: 1