>説明のページへ戻る
>前のソース
>次のソース
ロゴ部分をH1タグに変更する。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>HTMLサンプル</title>
<meta http-equiv="content-style-type" content="text/css">
<style type="text/css">
<!--
html {
width: 100%;
}
body {
background-color: #000;
margin: 0;
padding: 0;
width: 100%;
}
#allcontent {
width: 760px;
margin: 0 auto;
}
#head {
width: 760px;
margin: 0;
padding: 0;
}
#contents {
width: 760px;
margin: 0;
padding: 0;
}
#foot {
width: 760px;
margin: 0;
padding: 0;
}
#head ul{
list-style-type : none;
margin: 0;
padding: 0;
}
#head li{
list-style-type : none;
margin: 0;
padding: 0;
float:left;
text-indent: -9999px;
font-size:0;
line-height: 0;
}
h1#logo_top {
margin: 0;
padding: 0;
float:left;
text-indent: -9999px;
font-size:0;
line-height: 0;
}
h1#logo_top a {
text-decoration: none;
display: block;
width: 135px;
height: 65px;
background: transparent url(img/logo_2.gif) 0 0 no-repeat ;
}
li#menu1 a,li#menu2 a,li#menu3 a,li#menu4 a,li#menu5 a {
text-decoration: none;
display: block;
width: 125px;
height: 65px;
}
li#menu1 a {
background: transparent url(img/menu_1s.gif) 0 0 no-repeat ;
}
li#menu2 a {
background: transparent url(img/menu_2s.gif) 0 0 no-repeat ;
}
li#menu3 a {
background: transparent url(img/menu_3s.gif) 0 0 no-repeat ;
}
li#menu4 a {
background: transparent url(img/menu_4s.gif) 0 0 no-repeat ;
}
li#menu5 a {
background: transparent url(img/menu_5s.gif) 0 0 no-repeat ;
}
h1#logo_top a:hover,li#menu1 a:hover,li#menu2 a:hover,li#menu3 a:hover,li#menu4 a:hover,li#menu5 a:hover {
background-position: 0 -70px;
}
h2#mainimg {
margin: 0;
padding: 0;
text-indent: -9999px;
font-size:0;
line-height: 0;
display: block;
width: 760px;
height: 200px;
background: transparent url(img/top_img.gif) 0 0 no-repeat ;
}
#info ul{
list-style-type : none;
margin: 0;
padding: 0;
}
#info li{
list-style-type : none;
width: 380px;
margin: 0;
padding: 0;
float:left;
text-indent: -9999px;
font-size:0;
line-height: 0;
}
li#corp_outline a {
text-decoration: none;
display: block;
margin-left: auto;
width: 75px;
height: 20px;
background: transparent url(img/info_1_3.gif) 0 0 no-repeat ;
}
li#inq a {
text-decoration: none;
display: block;
margin-right: auto;
width: 97px;
height: 20px;
background: transparent url(img/info_2_3.gif) 0 0 no-repeat ;
}
li#corp_outline a:hover,li#inq a:hover {
background-position: 0 -25px;
}
#copyright {
clear:both;
margin: 0;
padding: 0;
text-indent: -9999px;
font-size:0;
line-height: 0;
}
#copyright a {
margin: 0 auto;
display: block;
width: 125px;
height: 20px;
background: transparent url(img/copyright_3.gif) 0 0 no-repeat ;
}
#copyright a:hover {
background-position: 0 -25px;
}
-->
</style>
<!--[if IE 5]>
<style type="text/css">
<!--
h1#logo_top {
text-indent: 0;
}
h1#logo_top a {
color: #000;
}
h1#logo_top a:hover{
color: #333;
}
#head li {
text-indent: 0;
}
h2#mainimg {
text-indent: 0;
}
#info li {
text-indent: 0;
}
#copyright {
text-indent: 0;
}
#head li a{
color: #000;
}
h2#mainimg {
color: #006;
}
#info li a{
color: #000;
}
#copyright a{
color: #000;
}
#head li a:hover{
color: #333;
}
#info li a:hover{
color: #333;
}
#copyright a:hover{
color: #333;
}
body {
text-align:center;
}
#allcontent {
text-align:left;
}
li#corp_outline {
text-align:right;
}
#copyright {
text-align:center;
}
-->
</style><![endif]-->
</head>
<body>
<div id="allcontent">
<div id="head">
<h1 id="logo_top"><a href="#">kikkyのパソコンQ&A</a></h1>
<ul>
<li id="menu1"><a href="#">メニュー1</a></li>
<li id="menu2"><a href="#">メニュー2</a></li>
<li id="menu3"><a href="#">メニュー3</a></li>
<li id="menu4"><a href="#">メニュー4</a></li>
<li id="menu5"><a href="#">メニュー5</a></li>
</ul>
</div>
<div id="contents">
<h2 id="mainimg">イメージ</h2>
</div>
<div id="foot">
<div id="info">
<ul>
<li id="corp_outline"><a href="#">企業概要</a></li>
<li id="inq"><a href="#">お問い合わせ</a></li>
</ul>
</div>
<div id="copyright">
<a href="#">コピーライト</a>
</div>
</div>
</div>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>HTMLサンプル</title>
<meta http-equiv="content-style-type" content="text/css">
<style type="text/css">
<!--
html {
width: 100%;
}
body {
background-color: #000;
margin: 0;
padding: 0;
width: 100%;
}
#allcontent {
width: 760px;
margin: 0 auto;
}
#head {
width: 760px;
margin: 0;
padding: 0;
}
#contents {
width: 760px;
margin: 0;
padding: 0;
}
#foot {
width: 760px;
margin: 0;
padding: 0;
}
#head ul{
list-style-type : none;
margin: 0;
padding: 0;
}
#head li{
list-style-type : none;
margin: 0;
padding: 0;
float:left;
text-indent: -9999px;
font-size:0;
line-height: 0;
}
h1#logo_top {
margin: 0;
padding: 0;
float:left;
text-indent: -9999px;
font-size:0;
line-height: 0;
}
h1#logo_top a {
text-decoration: none;
display: block;
width: 135px;
height: 65px;
background: transparent url(img/logo_2.gif) 0 0 no-repeat ;
}
li#menu1 a,li#menu2 a,li#menu3 a,li#menu4 a,li#menu5 a {
text-decoration: none;
display: block;
width: 125px;
height: 65px;
}
li#menu1 a {
background: transparent url(img/menu_1s.gif) 0 0 no-repeat ;
}
li#menu2 a {
background: transparent url(img/menu_2s.gif) 0 0 no-repeat ;
}
li#menu3 a {
background: transparent url(img/menu_3s.gif) 0 0 no-repeat ;
}
li#menu4 a {
background: transparent url(img/menu_4s.gif) 0 0 no-repeat ;
}
li#menu5 a {
background: transparent url(img/menu_5s.gif) 0 0 no-repeat ;
}
h1#logo_top a:hover,li#menu1 a:hover,li#menu2 a:hover,li#menu3 a:hover,li#menu4 a:hover,li#menu5 a:hover {
background-position: 0 -70px;
}
h2#mainimg {
margin: 0;
padding: 0;
text-indent: -9999px;
font-size:0;
line-height: 0;
display: block;
width: 760px;
height: 200px;
background: transparent url(img/top_img.gif) 0 0 no-repeat ;
}
#info ul{
list-style-type : none;
margin: 0;
padding: 0;
}
#info li{
list-style-type : none;
width: 380px;
margin: 0;
padding: 0;
float:left;
text-indent: -9999px;
font-size:0;
line-height: 0;
}
li#corp_outline a {
text-decoration: none;
display: block;
margin-left: auto;
width: 75px;
height: 20px;
background: transparent url(img/info_1_3.gif) 0 0 no-repeat ;
}
li#inq a {
text-decoration: none;
display: block;
margin-right: auto;
width: 97px;
height: 20px;
background: transparent url(img/info_2_3.gif) 0 0 no-repeat ;
}
li#corp_outline a:hover,li#inq a:hover {
background-position: 0 -25px;
}
#copyright {
clear:both;
margin: 0;
padding: 0;
text-indent: -9999px;
font-size:0;
line-height: 0;
}
#copyright a {
margin: 0 auto;
display: block;
width: 125px;
height: 20px;
background: transparent url(img/copyright_3.gif) 0 0 no-repeat ;
}
#copyright a:hover {
background-position: 0 -25px;
}
-->
</style>
<!--[if IE 5]>
<style type="text/css">
<!--
h1#logo_top {
text-indent: 0;
}
h1#logo_top a {
color: #000;
}
h1#logo_top a:hover{
color: #333;
}
#head li {
text-indent: 0;
}
h2#mainimg {
text-indent: 0;
}
#info li {
text-indent: 0;
}
#copyright {
text-indent: 0;
}
#head li a{
color: #000;
}
h2#mainimg {
color: #006;
}
#info li a{
color: #000;
}
#copyright a{
color: #000;
}
#head li a:hover{
color: #333;
}
#info li a:hover{
color: #333;
}
#copyright a:hover{
color: #333;
}
body {
text-align:center;
}
#allcontent {
text-align:left;
}
li#corp_outline {
text-align:right;
}
#copyright {
text-align:center;
}
-->
</style><![endif]-->
</head>
<body>
<div id="allcontent">
<div id="head">
<h1 id="logo_top"><a href="#">kikkyのパソコンQ&A</a></h1>
<ul>
<li id="menu1"><a href="#">メニュー1</a></li>
<li id="menu2"><a href="#">メニュー2</a></li>
<li id="menu3"><a href="#">メニュー3</a></li>
<li id="menu4"><a href="#">メニュー4</a></li>
<li id="menu5"><a href="#">メニュー5</a></li>
</ul>
</div>
<div id="contents">
<h2 id="mainimg">イメージ</h2>
</div>
<div id="foot">
<div id="info">
<ul>
<li id="corp_outline"><a href="#">企業概要</a></li>
<li id="inq"><a href="#">お問い合わせ</a></li>
</ul>
</div>
<div id="copyright">
<a href="#">コピーライト</a>
</div>
</div>
</div>
</body>
</html>