请问,任何人都可以提供帮助吗?无论窗口如何调整大小,我都需要将我的RH图像导航调整为始终位于浏览器窗口的底部。底部对齐流体布局中的右div元素
我已经创建了一个父.container(最大宽度800像素)与3- div的内部的流体布局:
- 桅在顶部
- 两个并排侧柱的div(66:33)的下方在桅
- LH:是型主体左对齐列,
- RH:导航右对齐柱 - 我需要的底部对齐
然后终于页脚div(主容器外部,跨越整个浏览器宽度)。
我的问题是,导航元素(堆叠在彼此顶部的4个翻转图像)永远不会与浏览器的底部对齐,而是停留在div的顶部。
我曾尝试以下CSS都无济于事:
垂直对齐:0底部:0填充底:0边距:0
我宁愿一个CSS的解决方案,也不会需要为div指定一个固定的高度。请任何人都可以帮忙?我已经搜索了几个星期的解决方案:(
由于我是一个新手,我无法发布图片在这里我有什么,所以我会尝试绘制下面,但这里也是一个链接到一个用下面的代码我的网站screengrab目前:
http://hooboo.co.uk/Screengrab.jpg
绘制出来,我有什么是:
-----800px container span-------------------------
+----topmast-------------------------------------+
+----2/3 width------------+ +----1/3 width-------+
| mainbody | | navigation (4-row)|
| that | | that is short |
| is | +--------------------+
| tall |
| |
+-------------------------+
--------------------------------------------------
+--------footer 100% browser width-----------------------+
我需要的是:
-----800px container span-------------------------
+----topmast-------------------------------------+
+----2/3 width------------+
| mainbody |
| that |
| is | +----1/3 width-------+
| tall | | navigation (4-row)|
| | | that is short |
+-------------------------+ +--------------------+
--------------------------------------------------
+--------footer 100% browser width-----------------------+
这里是我的CSS:
.container {
width: 84%;
height: 100%;
max-width: 800px;
padding-left: 3%;
padding-right: 3%;
padding-top: 6%;
padding-bottom: 0%;
margin-bottom: 0%;
margin-left: auto;
margin-right: auto;
margin-top: auto;
}
#topmast{
clear: both;
margin-left: 0;
margin-top: 25%;
height: auto;
width: 100%;
min-width: 240px;
min-height: auto;
display:block;
}
#navigation{
clear: right;
float:right;
width:33.125%;
height:600px;
height:auto;
max-width:265px;
vertical-align:bottom;
bottom: 0;
margin-bottom: 0;
padding-bottom: 0;
position:relative;
display:block;
}
#mainbody {
clear: left;
margin-right:33.125%;
margin-top: 0%;
width: 65%;
display:block;
}
#footer {
clear:both;
background-color:#333;
height:100px;
}
这里是我的两列HTML:
<div id="navigation" align="right" style="vertical-align:bottom">
<a href="mailto:[email protected]" target="_blank"
onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Email','','00_assets/buttons/00_BUTTONS_EMAILO.png',1)">
<img src="00_assets/buttons/00_BUTTONS_EMAIL.png" alt="Email: [email protected]"
width="100%" height="auto" id="Email" border="0" style="float: right;"/>
</a>
<a href="tel:+1234567890" target="_blank"
onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Call','','00_assets/buttons/00_BUTTONS_CALLO.png',1)">
<img src="00_assets/buttons/00_BUTTONS_CALL.png" alt="Call: +1234567890"
width="100%" height="auto" id="Call" border="0" style="float: right;"/>
</a>
<a href="https://url.com/screenname" target="_blank"
onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Twitter','','00_assets/buttons/00_BUTTONS_TWEETO.png',1)">
<img src="00_assets/buttons/00_BUTTONS_TWEET.png" alt="Tweet us"
width="100%" height="auto" id="Twitter" border=0 style="float: right;"/>
</a>
</div>
<div id="mainbody" align="left">
<h1>Welcome to website</h1>
<p class="Body"> Mainbody copy about website services goes here.</p>
</div>
请谁能帮助?我不知道如何使用JsFiddle发布演示..还是有点新的网页设计..非常感谢你提前。
谢谢布莱克这么快速回复。不幸的是,现在正在做的是,当我的导航底部对齐时,它将它对齐到左侧主体div的底部。但是,如果正文副本在没有滚动的情况下不适合浏览器,我需要导航才能坐在浏览器的底部,以便它不会被裁剪。这有意义吗?此外,现在我的图片在他们之间有一个突破,我认为这就是为什么我要显示:block并将它们浮动。这是另一个屏幕截图:[link](http://hooboo.co.uk/Screengrab2.jpg)谢谢你帮忙。 – user1788904