<!DOCTYPE html>
<html>
<head>
<title>HTML5 Layout</title>
<style>
body{
background-image: url(img/dark-wood.jpg)
}
*{
margin: 0;
padding: 0;
/* border: 1px dashed black; */
}
.wrapper{
width: 960px;
margin: 0 auto;
}
header{
margin-top: 30px;
height: 122px;
background-image: url(img/header.jpg);
}
nav{
height: 40px;
position: relative;
top: 80px;
background-color: #B8B8B8;
}
ul>li{
float: left;
width: 90px;
overflow: hidden;
margin-top: 10px;
}
ul>li>a{
color: white;
text-decoration: none;
font-size: 18px;
text-align: center;
}
.current{
color: #000000;
margin-left: 10px;
}
footer{
height: 60px;
background: #ADFF2F;
}
.courses{
float: left;
width: 77%;
overflow: auto;
margin-top: 30px;
}
article{
background-color: #FFFFFF;
height: 350px;
background-color: white;
}
figure{
float: left;
width: 295px;
height: 220px;
padding: 5px;
margin: 20px;
border: 1px solid #eee;
}
hgroup>h2{
padding-top: 30px;
}
hgroup>h3{
margin-bottom: 10px;
color: #de6581;
}
aside{
margin-top: 40px;
float: left;
width: 25%;
height: 700px;
background-color:white ;
}
footer{
clear: both;
height: 30px;
background-color: #B8B8B8;
}
aside {
width: 220px;
float: left;
}
article:last-child{
margin-top: -10px;
}
aside>section>a {
display: block;
padding: 10px;
border-bottom: 1px solid #eee;
}
aside>section>a:hover {
color: #985d6a;
background-color: #efefef;
}
a {
color: #de6581;
text-decoration: none;
}
h2 {
margin: 10px 0 5px;
}
h3 {
color: #de6581;
padding: 0 0 20px;
}
aside>section>h2 {
padding: 30px 0 20px;
color: #de6581;
}
</style>
</head>
<body>
<div class="wrapper">
<header>
<h1> </h1>
<nav>
<ul>
<li><a href="" class="current">home</a></li>
<li><a href="">classes</a></li>
<li><a href="">catering</a></li>
<li><a href="">about</a></li>
<li><a href="">contact</a></li>
</ul>
</nav>
</header>
<section class="courses">
<article>
<figure>
<img src="img/bok-choi.jpg" alt="Bok Choi" />
<figcaption>Bok Choi</figcaption>
</figure>
<hgroup>
<h2>Japanese Vegetarian</h2>
<h3>Five week course in London</h3>
</hgroup>
<p>A five week introduction to traditional Japanese vegetarian meals, teaching you a selection of rice and noodle dishes.</p>
</article>
<article>
<figure>
<img src="img/teriyaki.jpg" alt="Teriyaki sauce" />
<figcaption>Teriyaki Sauce</figcaption>
</figure>
<hgroup>
<h2>Sauces Masterclass</h2>
<h3>One day workshop</h3>
</hgroup>
<p>An intensive one-day course looking at how to create the most delicious sauces for use in a range of Japanese cookery.</p>
</article>
</section>
<aside>
<section class="popular-recipes">
<h2>Popular Recipes</h2>
<a href="">Yakitori (grilled chicken)</a>
<a href="">Tsukune (minced chicken patties)</a>
<a href="">Okonomiyaki (savory pancakes)</a>
<a href="">Mizutaki (chicken stew)</a>
</section>
<section class="contact-details">
<h2>Contact</h2>
<p>Yoko's Kitchen<br />
27 Redchurch Street<br />
Shoreditch<br />
London E2 7DP</p>
</section>
</aside>
<footer>
© 2011 Yoko's Kitchen
</footer>
</div>
</body>
</html>
css-homework2
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 超出隐藏,不换行,省略号 overflow:hidden; //超出的文本隐藏 text-overflow:ell...
- <!DOCTYPE html> 我的网页 .icon { w...
- reset.css在HTML标签在浏览器里有默认的样式,例如 p 标签有上下边距,strong标签有字体加粗样式,...
- 四、DIV+CSS标准化布局 (六)、DIV+CSS布局设计 元素居中,块元素和行内元素 块元素:需要指定宽度,居...
- css reset是什么 css reset 即重置浏览器标签的样式表,现在所使用的主流浏览器对一些标签的默认属性...