programming-examples/css/Anchor float left.html

54 lines
1.3 KiB
HTML
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" subLang="en-US" xml:subLang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Anchor float left</title>
<style rel="stylesheet" type="text/css">
#header {
width: 900px;
height: 300px;
background-image: url(images/background-image.jpg);
background-position: top left;
background-repeat: no-repeat
}
#menu {
float: left;
margin: 50px 0 0 23px;
}
#menu li {
display: inline;
list-style-type: none;
line-height: 30px;
}
#menu li a {
background-color: pink;
background-position: top left;
background-repeat: no-repeat;
height: 30px;
display: block;
float: left;
font-family: Helvetica;
font-size: 16px;
color: blue;
text-decoration: none;
text-align: center
}
</style>
</head>
<body>
<ul id="menu">
<li><a href="happycodings.com">happycodings</a></li>
<li><a href="android.happycodings.com">android</a></li>
<li><a href="csharp.happycodings.com">csharp</a></li>
<li><a href="php.happycodings.com">php</a></li>
<li><a href="javascript.happycodings.com">javascript</a></li>
</ul>
</body>
</html>