徽标和菜单未对齐

时间:2013-07-24 11:40:59

标签: javascript html css

我的问题是我希望徽标和ΛΟΓΙΣΜΙΚΟ菜单对齐。 我已经尝试了一切,但我不能让它们一起移动。菜单移动得更快...... 我正在尝试使用javascript来获取位置并设置徽标以与菜单相同的位置移动,但我无法弄清楚这里是http://www.altasoft.gr/index_.htm页面

<div class="header">
    <div style="position:relative;top:10px; z-index:99; width:50%"><a href="http://www.altasoft.gr/index_.htm"><img  src="images/Altasoft_Logo.png" alt="" width="354" height="91" /></a></div>
    <div style="position:relative; left:10%; top:-30px; z-index:5; width:80%; min-width:550px;"> <img style="float:right;" src="images/telephone.gif" alt="" width="142" height="16" /></div>
</div>
.nav-container {
    background: #eaeaeb;
    /*background: #fff url(../images/menu_bg.gif) no-repeat 50% 0%;*/
    clear: both;
    height: 48px;
}
#nav {
    /*padding: 0px 0px 0px 30px;*/
    width: 931px/*920px*/;
}
#nav li {
    padding-right: 8px;
    margin-top: 10px;
    padding-bottom: 10px;
    text-decoration: none;
}

3 个答案:

答案 0 :(得分:1)

<div class="header">
    <div style="left: 17%;
top: 10px;
z-index: 99;
width: 859px;
margin: auto;"><a href="http://www.altasoft.gr/index_.htm"><img width="354" height="91" alt="" src="images/Altasoft_Logo.png"></a></div>


     <div style="position:relative; left:10%; top:-30px; z-index:5; width:80%; min-width:550px;"> <img width="142" height="16" alt="" src="images/telephone.gif" style="float:right;"></div>
       </div>

答案 1 :(得分:0)

只需更改#nav

的宽度即可

截图:

enter image description here

答案 2 :(得分:0)

实际上您应该按照下面提到的代码进行操作,我希望这对您有用,请使用我的代码更改您的header DIV 代码: -

<强> HTML

<div class="header">
    <div style="margin: auto; width: 931px;"><a href="http://www.altasoft.gr/index_.htm"><img width="354" height="91" alt="" src="images/Altasoft_Logo.png"></a></div>


     <div style="position:relative; left:10%; top:-30px; z-index:5; width:80%; min-width:550px;"> <img width="142" height="16" alt="" src="images/telephone.gif" style="float:right;"></div>
       </div>

您必须从logo div及其position values 顶部&amp;中移除位置属性,只需使用width:931px;定义margin:auto,并根据您的要求正常工作....

<强> see the attached demo

相关问题