为什么容器会向右移动?有任何想法吗 ?我尝试了一切,谢谢你的帮助,只有当图像不那么大时它才会移动。 .header-container { 身高:153px;}
.header-container .header {
height: 90px;
min-width: 1000px;
background: #f2743a;
border-top: 63px solid #ffffff;}
.header-container .header .header-inside {
width: 1000px;
margin: 0px auto;}
.header-container .header .header-inside .logo {
float: left;
position: relative;
top: -60px;}
.header-container .header .header-inside .header-nav {
float: right;}
.header-container .header .header-inside .header-nav ul {
padding: 31px 0px 31px 20px;}
.header-container .header .header-inside .header-nav ul li {
display: inline-block;}
.header-container .header .header-inside .header-nav ul li a {
padding: 4px 8px 4px 8px;
font-family: Tahoma;
font-size: 18px;
color: #ffffff;
text-decoration: none;}
.header-container .header .header-inside .header-nav ul li a:hover {
background: #85be64;
border-radius: 3px;}
HTML
<div class="header-container clear">
<header class="header">
<div class="header-inside">
<a href="#" class="logo"><img src="http://i.imgur.com/88MTH3i.jpg"></img></a>
<div class="header-nav">
<ul>
<li><a href="#">Namai</a></li>
<li><a href="#">Kontaktai</a></li>
</ul>
</div>
</div>
</header>
</div>
<div class="main-container clear">
fdghfghfdghg
</div>
答案 0 :(得分:0)
将min-width更改为header-container标头
示例:
.header-container .header {
width: 400px;
}