在html5中对齐图像 [英] Align image in html5
本文介绍了在html5中对齐图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个代码:
<header>
<div id="title">
<img alt="logo" src="/Content/logo.gif" />
</div>
<nav>
<ul id="menu">
<li>Products</li>
<li>Auctions</li>
<li>Segmentation</li>
</ul>
</nav>
</header>
产生此结果:
我想要的图像将在白框上方(它将根据图像对齐)。我如何做呢?
I want that the image will be above the white box(that it will align according to the image). How do I do it?
我使用默认的asp.net mvc3模板。
BTW I use the default asp.net mvc3 template.
感谢。
推荐答案
这些元素。如果是,请尝试设置标题的overflow属性:
I'm assuming you're floating these elements. If so, try setting the overflow property of the header:
header {
overflow: auto
}
这篇关于在html5中对齐图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文