I'm sure one line of code will change this, but can anyone tell me why there is a gap between my divs for "About" and "Latest"? I've put margin and padding to 0 too many places already. Thanks:
HTML:
<body>
<div id="header" border="0">
<div class="header_logo"><img src="images/logo.png" height="100px" alt="Ashley Lincoln Designs"></div>
<div class="header_button"><span>Contact</span></div>
<div class="header_button"><span>Archive</span></div>
<div class="header_button"><span>Latest</span></div>
<div class="header_button"><span>About</span></div>
</div>
//rest of code...
CSS:
{
margin: 0;
padding: 0;
}
body {
background-color: #174C4F;
margin: 0;
padding: 0;
}
#header {
width: 100%;
height: 100px;
margin: 0;
padding: 0;
background-color: #F5E9BE;
color: #207178;
}
.header_logo {
height: 100px;
margin: 0 auto;
padding: 0;
color: #207178;
font-family: "Verdana", Verdana, sans-serif;
font-size: 20px;
text-align: center;
text-transform:uppercase;
text-indent: 0px;
display:inline-block;
background-color: #F5E9BE;
float: left;
position:absolute;
left:75px;
}
.header_button {
width: 125px;
margin: 0 auto;
padding: 0;
color: #207178;
font-family: "Verdana", Verdana, sans-serif;
font-size: 20px;
text-align: center;
text-transform:uppercase;
text-indent: 0px;
display:inline-block;
background-color: #F5E9BE;
float: right;
position:relative;
right:75px;
}
在您的CSS类中。
display:inline-block
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.