Javascript 徽标和菜单未对齐
我的问题是,我希望徽标和∧ΓΓ∑∑ΜΚΚΚö菜单对齐。 我什么都试过了,但我不能让他们一起行动。菜单移动得快多了。。。 我正在尝试用javascript获取位置,并将徽标设置为与菜单相同的位置移动,但我无法确定这是页面Javascript 徽标和菜单未对齐,javascript,html,css,Javascript,Html,Css,我的问题是,我希望徽标和∧ΓΓ∑∑ΜΚΚΚö菜单对齐。 我什么都试过了,但我不能让他们一起行动。菜单移动得快多了。。。 我正在尝试用javascript获取位置,并将徽标设置为与菜单相同的位置移动,但我无法确定这是页面 只需更改导航的宽度即可 截图: 嘿,实际上你应该遵循下面提到的代码,我希望这对你有用。请用我的代码更改你的标题DIV代码:- HTML <div class="header"> <div style="margin: aut
只需更改导航的宽度即可 截图:
嘿,实际上你应该遵循下面提到的代码,我希望这对你有用。请用我的代码更改你的
标题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>
您必须从徽标div
及其位置值中删除位置属性,只需定义宽度:931px代码>带页边距:自动
,可根据您的要求正常工作
<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>
<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>
<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>