需要CSS帮助-跨多个分辨率水平放置DIV(偏离中心)
希望能在多个分辨率下正确定位DIV时得到一些帮助 如果您访问我的测试站点,我基本上需要的是使红色菜单链接与白色栏正确匹配。他们在一个适当的高度设置简单的边缘顶部:131px;属性,但我不知道如何使它们正确地水平放置在不同分辨率的监视器上。现在,只剩下一个空白:设置一个值,使它在我的显示器上显示正确-有人能帮我吗 我想我需要做的是以某种方式将横幅文本div与其绝对位置嵌套,或者在另一个相对div内设置边距,但我无法确切地知道如何做到这一点。。。我甚至可能用了太多的div,我只是不确定。。。我只是通过猜测拼凑了这么多。真的很感谢有人给我点灯 这是我的CSS需要CSS帮助-跨多个分辨率水平放置DIV(偏离中心),css,html,resolutions,Css,Html,Resolutions,希望能在多个分辨率下正确定位DIV时得到一些帮助 如果您访问我的测试站点,我基本上需要的是使红色菜单链接与白色栏正确匹配。他们在一个适当的高度设置简单的边缘顶部:131px;属性,但我不知道如何使它们正确地水平放置在不同分辨率的监视器上。现在,只剩下一个空白:设置一个值,使它在我的显示器上显示正确-有人能帮我吗 我想我需要做的是以某种方式将横幅文本div与其绝对位置嵌套,或者在另一个相对div内设置边距,但我无法确切地知道如何做到这一点。。。我甚至可能用了太多的div,我只是不确定。。。我只是通
#banner-wrap
{
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 50;
}
#banner-container
{
height: 204px;
background: url('http://test.vtisvc.com/wp-content/uploads/2013/08/header_hoodbar8.png');
background-repeat: no-repeat;
background-position: center;
}
#banner-logo
{
width: 940px;
margin-left: auto;
margin-right: auto;
z-index: 60;
}
#banner-icon
{
width: 940px;
margin: 0 auto;
position: relative;
z-index: 70;
}
#banner-text
{
position: fixed;
width: 940px;
top: 0;
left: 0;
margin-top: 131px;
margin-left: 330px;
z-index: 80;
}
这是我在header.php中的HTML
<body>
<div id="banner-wrap">
<div id="banner-container">
<div id="banner-logo">
<div id="banner-icon">
<center><img src="http://test.vtisvc.com/wp-content/uploads/2013/08/header_logo3.png" style="float:center"></center></div>
</div></div></div>
<div id="banner-text">
<a href="http://test.vtisvc.com"><font face="georgia" color=#8a0304">HOME</font></a>
<a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">LISTINGS</font></a>
<a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">AGENTS</font></a>
<a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">SEARCH MLS</font></a>
<a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">RENTALS</font></a>
<a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">HISTORY</font></a>
<a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">CONTACT</font></a></div>
将id为banner文本的div移动到banner图标div中,并更改style.css中的css,如下所示: HTML
<div id="banner-icon">
<center>
<img src="http://test.vtisvc.com/wp-content/uploads/2013/08/header_logo3.png" style="float:center">
<div id="banner-text">
<a href="http://test.vtisvc.com"><font face="georgia" color="#8a0304"">HOME</font></a> <a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">LISTINGS</font></a> <a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">AGENTS</font></a> <a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">SEARCH MLS</font></a> <a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">RENTALS</font></a> <a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">HISTORY</font></a> <a href="http://test.southernventures.com/contact"><font face="georgia" color="#8a0304">CONTACT</font></a>
</div>
</center>
</div>
#banner-text {
position: relative;
width: 940px;
top: 0;
left: 0;
margin-top: -44px;
margin-left: -346px;
z-index: 80;
}