2013-07-24 93 views
0

我的問題是,我想讓徽標和ΛΟΓΙΣΜΙΚΟ菜單對齊。 我嘗試了一切,我無法讓它們一起移動。在菜單間移動速度快了很多...... 我用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; 
} 

回答

0

哎其實你應該遵循下面提到的代碼,我希望這會爲你工作,請與我的代碼更改headerDIV代碼: -

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> 

u必須從您的logo div及其position values頂部刪除位置財產離開,只是用margin:auto定義width:931px;及其工作罰款按您的要求....

see the attached demo

+0

THX它的工作! –

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>