How to fix gaps in document
hello dreamweavers.
im practising in dw , ive came across problem, when see webpage in live view there huge gap,from top till navigation bar begins.
here screenshot , code:
thank you
#nav {
list-style-type: none;
width: 700px;
margin-right: auto;
margin-left: auto;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}
#nav li {
background-color: rgb(0,0,255);
text-align: center;
display: block;
float: left;
width: 15%;
padding: 10px;
font-family: tahoma, geneva, sans-serif;
text-transform: capitalize;
margin-right: 5px;
border: thin double rgb(255,0,0);
}
#article { width: 500px;
margin-right: auto;
margin-left: auto;
margin-top: 100px;
height: 500px;
}
a:link {
color: rgb(255,255,255);
}
a:hover {
color: rgb(102,255,0);
}
</style>
</head>
<body>
<ul id="nav">
<li><a href="index.html">home</a></li>
<li><a href="about.html">about</a></li>
<li><a href="portfolio.html">portfolio</a></li>
<li><a href="location.html">location</a></li>
<li><a href="contact.html">contact</a></li>
</ul>
<div id="article">
<h1>location</h1>
<p> </p>
<p>contrary popular belief, lorem ipsum not random text. has roots in piece of classical latin literature 45 bc, making on 2000 years old. richard mcclintock, latin professor @ hampden-sydney college in virginia, looked 1 of more obscure latin words, consectetur, lorem ipsum passage, , going through cites of word in classical literature, discovered undoubtable source. lorem ipsum comes sections 1.10.32 , 1.10.33 of "de finibus bonorum et malorum" (the extremes of , evil) cicero, written in 45 bc. book treatise on theory of ethics, popular during renaissance. first line of lorem ipsum, "lorem ipsum dolor sit amet..", comes line in section 1.10.32.</p>
</div>
</body>
</html>
use clear: both; below instead of margin-top: 100px; i've commented out /* */
#article {
width: 500px;
margin-right: auto;
margin-left: auto;
clear: both;
/* margin-top: 100px; */
height: 500px;
}
whenever use 'float' attribute have <li> tags need 'clear' floats following elements in case 'article' container gets put correct html flow.
More discussions in Dreamweaver support forum
adobe
Comments
Post a Comment