Floating Image HTML
<!DOCTYPE html>
<html>
<head>
<style>
div.gallery {
margin: 5px;
border: 1px solid #ccc;
float: left;
width: 180px;
}
div.gallery:hover {
border: 1px solid #777;
}
div.gallery img {
width: 100%;
height: auto;
}
div.desc {
padding: 9px;
text-align: center;
font-size: smaller;
}
</style>
</head>
<body>
<h1>Floating Images</h1>
<div class="gallery">
<a target="_blank" href="photo1.jpg">
<img src="photo1.jpg" alt="Golden Gate Bridge" width="600" height="400">
</a>
<div class="desc">Golden Gate Bridge</div>
</div>
<div class="gallery">
<a target="_blank" href="photo2.jpg">
<img src="photo2.jpg" alt="Rocky Shoreline" width="600" height="400">
</a>
<div class="desc">Rocky Shoreline</div>
</div>
<div class="gallery">
<a target="_blank" href="photo3.jpg">
<img src="photo3.jpg" alt="Waves Crashing" width="600" height="400">
</a>
<div class="desc">Waves Crashing</div>
</div>
<div class="gallery">
<a target="_blank" href="photo4.jpg">
<img src="photo4.jpg" alt="Ocean Sunset" width="600" height="400">
</a>
<div class="desc">Ocean Sunset</div>
</div>
<div class="gallery">
<a target="_blank" href="photo5.jpg">
<img src="photo5.jpg" alt="Waterfall On The Beach" width="600" height="400">
</a>
<div class="desc">Waterfall On The Beach</div>
</div>
<div class="gallery">
<a target="_blank" href="photo6.jpg">
<img src="photo6.jpg" alt="Fog Moving In" width="600" height="400">
</a>
<div class="desc">Fog Moving In</div>
</div>
</body>
</html>
Output
Bistro Blog HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Lighthouse Island Bistro</title>
<meta charset="utf-8">
<link rel="stylesheet" href="lighthouse.css">
</head>
<body>
<div id="wrapper">
<header>
<h1>Lighthouse Island Bistro</h1>
<h6>the best coffee on the coast</h6>
</header>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="rooms.html">Menu</a></li>
<li><a href="directions.html">Directions</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
<div id="content">
<h5 id="box">Watch for the March Madness Wrap next month!</h5>
<h2>Bistro Blog</h2>
<h2><font color="#000066"> Hari Malaysia Wrap</font></h2>
<p>September 16,2019</p>
<p>The September special sandwich is the Hari Malaysia Wrap - heart-healthy organic chicken with roasted red peppers on a whole wheat wrap.</p>
<h2><font color="#000066">New Coffee of the Day Promotion</font></h2>
<p>September 16,2019</p>
<p>Enjoy the best coffee on the coast in the comfort of your home. We will feature a different flavor of our gourmet,locally roasted coffee each day with free bistro tastings and a discount on one-pound bags.</p>
</div>
<footer>Copyright © 2019</footer>
</div>
</body>
</html>
Bistro Blog CSS
body{background-color:#00005D;
font-family:Verdana,Arial,sans-serif;}
#wrapper{text-align:left;
width:80%;
min-width: 940px;
color:#000066;
background-color: #B3C7E6;
margin: auto; }
header{background-color: #869DC7;
color:#00005D;
font-size: 145%;
padding-top: 10px;
padding-bottom: 10px;
padding-right: 10px;
padding-left: 155px;
height:135px;
background-image: url(lighthouselogo.jpg);
background-repeat: no-repeat;
background-size:contain;}
nav{float:left;
width:200px;
font-weight: bold;
letter-spacing: 0.1em;}
#content{background-color: #FFFFFF;
color: #000000;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 20px;
padding-right: 20px;
overflow: auto;}
footer{font-size: 70%;
text-align: center;
padding: 10px;
background-color: #869DC7;
clear: both;}
h2{color:#869DC7;
font-family: arial,verdana,sans-serif;}
#floatright{float: right;
margin: 10px;}
ul{list-style-type: none;
margin: inherit;
padding: inherit;}
nav a:link{text-decoration: none;
padding: 20px;
background-color: #B3C7E6;
border-bottom: 1px solid white;
display: block;}
nav a:link{color: #FFFFFF;}
nav a:visited{color: #EAEAEA;}
nav a:hover{color:#869DC7;
background-color: #EAEAEA;}
h6{text-align: right;}
#box{
width:250px;
border: 1px;
padding: 10px;
position: fixed;
right: 180px;
background-color:lightgray;
box-shadow: 5px 5px 10px darkgray;}
Output
Subscribe to:
Post Comments (Atom)
CSS Two-Column Page Layout
CSS Two-Column Page Layout HTML <!DOCTYPE html> <html lang="en"> <head> <title>Lighthouse Island ...
-
index.html <!DOCTYPE html> <html> <head> <style type="text/css"> body{background-color:#...
-
CSS Two-Column Page Layout HTML <!DOCTYPE html> <html lang="en"> <head> <title>Lighthouse Island ...
-
Floating Image HTML <!DOCTYPE html> <html> <head> <style> div.gallery { margin: 5px; border: 1px solid #...
No comments:
Post a Comment