@charset "Shift_JIS"; * {margin:0; padding:0;} body { text-align:center; background-color:#eeeeee; } #page-body { width:840px; text-align:left; background-color:yellow; } #header { height:40px; color: #ffffff; background-color:black; } #leftpage { float:left; width:120px; background-color:white; } 以下は省略 |
<html> <head> <link rel="stylesheet" href="test.css" type="text/css"> <title>CSSページ</title> </head> <body> <div id="page-body"> <div id="header"> </div> <div id="leftpage"> <a href="page1.html">ページ1</a><br> <a href="page2.html">ページ2</a><br> <a href="page3.html">ページ3</a><br> </div> 以下は省略 |
#leftpage { float:left; width:120px; background-color:white; } #leftpage a {color:darkblue;} #leftpage a:hover { color:white; background:gray; } |