我正在尝试创建一个最好描述为网格格式的博客标题。每个项目都有一个指定的位置——上、下、左、右——在它的每一边都有一个边框。我已经完成了基本布局,但是将其细化成像素完美的网格有点超出我的能力范围。我附上了一张它最终应该是什么样子的图片。下面是代码..我错过了什么?
html-
<div id="blog-header">
<span class="blog-logo"><img src="http://placehold.it/262x134" alt="logo" /></span><!-- end blog-logo -->
<div class="mid">
<p class="blurb">Hi, this is a brief bio.<br/>Ok that's it!</p><!-- end blurb -->
<div class="blog-social">
<ul>
<li><a href="#"><img src="http://placehold.it/25x25" alt="facebook" /></a></li>
<li><a href="#"><img src="http://placehold.it/25x25" alt="twitter" /></a></li>
<li><a href="#"><img src="http://placehold.it/25x25" alt="instagram" /></a></li>
<li><a href="#"><img src="http://placehold.it/25x25" alt="pinterest" /></a></li>
</ul>
</div><!-- end blog-social -->
</div><!-- end mid -->
<div class="right">
<p class="blog-nav"><a href="index.php?page_id=7">PORTFOLIO<span style="padding: 0 5px 0 5px;">|</span></a><a href="index.php?page_id=26">BLOG<span style="padding: 0 5px 0 5px;">|</span></a><a href="index.php?page_id=5">ABOUT<span style="padding: 0 5px 0 5px;">|</span></a><a href="index.php?page_id=9">CONTACT</a></p>
<div class="email">
<img src="http://placehold.it/350x50">
</div><!-- end email -->
</div><!-- end right -->
</div><!-- end blog-header -->
css-
#blog-header {
height: 124px;
width: inherit;
margin: 0 auto;
}
#blog-header .mid,
#blog-header .blog-logo {
border-right: 2px solid #333333;
float: left;
}
#blog-header .mid {
padding-left: 15px;
width: 230px;
}
#blog-header .right {
padding-left: 15px;
float: right;
}
#blog-header .blog-logo {
padding-right: 15px;
width: 262px;
}
#blog-header .blurb {
border-bottom: 2px solid #333333;
padding-bottom: 15px;
font-family: Alexandria;
font-size: 80%;
text-align: center;
width: 200px;
}
#blog-header .blog-social {
clear: both;
width: 125px;
margin: 0 auto;
padding: 10px 0 10px 0;
}
#blog-header .blog-nav {
padding: 7px 0 15px 0;
width: 350px;
}
#blog-header .email {
border-top: 2px solid #333333;
padding-top: 17px;
width: 350px;
}