position
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>position</title> <style type="text/css"> <!-- *{ margin:0; padding:0; } #container{ width:780px; background-color:#cccccc; } ul{ list-style-type: none; } #header{ width:760px; height:100px; position:relative; background-color:#ffffff; } #header_inner{ width:400px; position:absolute; right:20px; top:20px; font-size:0.875em; text-decoration: none; } #header_inner li{ display:inline; margin: 0 0 0 20px; } #content{ clear:both; width:780px; height:500px; background-color:#000000; } #footer{ width:780px; height:100px; background-color:#ffffff; } --> </style> </head> <body> <div id="container"> <div id="header"> <div id="header_inner"> <ul> <li><a href="#">このサイトについいて</a></li> <li><a href="#">お問い合わせ</a></li> <li><a href="#">サイトマップ</a></li> </ul> </div> </div> <div id="content"> </div> <div id="footer"> <br /><br /> </div> </div> </body> </html>
contentとfooterが表示されませんでした。どこにあるのだろう。しかし、授業では出来なかった横並びが確認できた。