Webサイト制作科 | 受講記録 | 苦楽中道

2014年01月27日開講の求職者支援訓練(フェリカTA_Webサイト制作科)における受講メモと習熟度記録

floatを使ったレイアウト:テスト&

f:id:sophisticatedweapon:20140217112940j:plain

<!DOCTYPE html>

<html lang="ja">

<head>

<meta charset="UTF-8">

<title>floatを使ったレイアウト:テスト</title>

<link rel="stylesheet" href="0217/CSS/style1.css">

</head>

<body>

<div id="container">

  <div id="header">ここにheaderの内容が入る</div>

  <div id="nav">

  <ul>

  <li><a href="#">カテゴリ1</a></li>

  <li><a href="#">カテゴリ2</a></li>

  <li><a href="#">カテゴリ3</a></li>

  <li><a href="#">カテゴリ4</a></li>

  <li class="last"><a href="#">カテゴリ5</a></li>

  </ul>

  </div><!--nav-->

  <div id="wrapper">

  <div id="content">ここにcontentの内容が入る</div>

  <div id="sidebar">ここにsidebarの内容が入る</div>

  </div><!--wrapper-->

  <div id="footer">ここにfooterの内容が入る</div>

</div><!--container-->

</body>

</html>

//////////////////////////////////////////////////////////////////////////////////////////////////

 

@charset "utf-8";

 

/* reset */

 

html, body, div, ul, li {

  margin: 0;

  padding: 0;

  line-height: 1.0;

  font-family:

  "Hiragino Kaku Gothic Pro",

  Meiryo,

  sans-serif

}

ul {

  list-style: none;

}

a {

  text-decoration: none;

}

 

/* layout */

body {

  font-size: 16px;

  background-color: #D9D9D9;

}

#container {

  width: 780px;

  margin: 10px auto;

  padding: 10px;

  background: #FFF;

}

#header {

  height: 50px;

  background-color: #096;

}

#wrapper {

  overflow: hidden;

  margin-bottom: 10px;

}

#nav {

  margin-bottom: 10px;

}

 

#content {

  float: right;

  width: 550px;

  height: 300px;

  background-color: #CC3;

}

#sidebar {

  float: left;

  width: 220px;

  height: 300px;

  background-color: #F99;

}

ul {

  width: 780px;

  overflow: hidden;

}

li {

  float: left;

  width: 156px;

}

li a {

  display: block;

  line-height: 3.0em;

  text-align: center;

  border-right: 2px solid #FFF;

  background: #393;

  color: #FFF;

  font-weight: bold;

}

li.last a {

  border-right: none;

}

li a:hover {

  background: #F60;

}

#footer {

  height: 50px;

  background-color: #069;

}