Beruflich Dokumente
Kultur Dokumente
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="This is an HTML5 example">
<meta name="keywords" content="Smoothies, SmoothieWorld">
<link rel="stylesheet" href="styles1.css">
</head>
<body>
<!-- This is the beginning of the wrapping div. This div will nest all of the other page elements and have a fixed-width.-->
<div id="wrap">
<!-- This is the beginning of the masthead div. Sometimes known as the "header", this div will contain the site logo and
eventually other sections such as the secondary navigation .-->
<div id="masthead">
</div>
<!-- End of Masthead Div-->
<!-- This is the beginning of the main navigation div. We call this "mainnav" because it will serve as users primary method of
navigation.-->
<div id="mainnav">
</div>
<!-- End of mainnav Div-->
<!-- This is the beginning of the innerwrap section, called so because it nests the sidebar and maincontent but is itself nested
within the wrap div..-->
Week 3
Page 1
<div id="innerwrap">
<!-- This is the beginning of the sidebar. Although this sidebar will be positioned to the left, you want to avoid giving sidebars
names such as 'left' or 'right', this avoids confusion if you decide to move the sidebar at any point.-->
<div id="sidebar">
<h2>Top Rated Smoothies</h2>
<h3>The Funky Orange</h3>
<p>Submitted by user LJ, this smoothie has recieved over 200 5 star ratings and its <strong>orange juice</strong>
and <strong>banana</strong> base make this a great choice for breakfast!
</p>
<h3>The Tropical KickBack</h3>
<p>Submitted by user MK, this smoothie combines the exotic ingredients passionfruit and mango. The result is an
invigorating and delicious beverage that is great any time of the day.
</p>
</div>
<!-- End of Sidebar Div-->
<!-- This is the beginning of the main column which is named so because it holds the primary content of the site..-->
<div id="main">
<h1>SmoothieWorld is your #1 destination for smoothie recipes.</h1>
<h2>Our mission statement </h2>
<p>We here at SmoothieWorld are devoted to making the smoothie beverage a daily part of your life. Whether it be
for breakfast, lunch or even dinner, smoothies are great way to get the nutrition you need and have fun while doing it.</p>
<p>The recipes on our site have all been tested in our lab of smoothie experts. Other smoothie sites might have
more recipes or feature more exotic fruits than you'll find here, but we feel that quality beats out quantity and novelty any
day. We also believe the best recipes come from you the reader, that's why we encourage you to join our smoothie
community. Learn more</p>
</div>
<!-- End of Main Div-->
</div>
<!-- End of Innerwrap Div-->
<div id="footer">
<p>Footer </p>
</div>
Week 3
Page 2
Page 3
background-color: #fff;
}
Week 3
Page 4
Adding the clear property to an object means that no floated elements are allowed to its sides, and you can specify whether
this is right, left or both.
Add the following to your .css file:
#footer{
clear:both;
background-color: #ba2b22;
}
href
href
href
href
href
href
=
=
=
=
=
=
"index.html">Home</a></li>
"about.html">About</a></li>
"recipes.html">Recipes</a></li>
"submitrecipe.html">Submit a Recipe</a></li>
"forum.html">Forum</a></li>
"contact.html">Contact Us</a></li>
Page 5
height: 25px;
background-color: #ccc;
text-align: center;
border-left: 1px black solid;
border-right: 1px black solid;
There is no way to vertically centre objects in CSS, so in this case, we will use the line-height property to move the nav text
downwards.
Add the following to the mainnav li:
line-height: 25px;
{
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 0.875em;
line-height:1.75em;
}
h1
{
font-size: 1.5em;
line-height:1.5em;
font-weight: normal;
Week 3
Page 6
}
h2,h3{
font-size:1.125em;
font-weight:lighter;
text-transform:uppercase;
letter-spacing:0.2em;
}
h3
{
font-size:0.875em;
letter-spacing:0.1em;
}
ul
{
font-size: 0.875em;
list-style-position: inside;
}
ol
{
font-size: 0.875em;
}
Name it base.css and add the following line to the head section of your .html document:
<link rel="stylesheet" href="base.css">
Save and view your .html file.
Week 3
Page 7