[英]Aligning Div to the bottom right
I have two elements that I would like to put on the bottom right of the page.I went through a couple of threads but some parts help and others tend to kill the layout. 我想在页面的右下角添加两个元素,我经历了几个线程,但有些部分有所帮助,而另一些则倾向于破坏布局。
Note: The background color is for illustration purposes. 注意:背景色仅供参考。 I would like the text aligned to the right.
我希望文本右对齐。
Here is where I am at: ( http://jsfiddle.net/dsri/WswG9/ ) 这是我的位置:( http://jsfiddle.net/dsri/WswG9/ )
HTML: HTML:
<div id="container">
<div id="a"> <span id="aa">Text1</span></div>
<div id="b"> <span id="bb">Text2</span></div>
</div>
CSS: CSS:
div#container{
text-align: center;
}
span#aa{
font-size: 75px;
color: rgba(0, 0, 0, 0.5);
background-color: Yellow;
overflow: hidden;
}
span#bb{
font-size: 45px;
color: rgba(0,0,0,0.5);
background-color: red;
}
This is what I would ideally like: http://i.imgur.com/ANuAvly.png 这就是我理想的情况: http : //i.imgur.com/ANuAvly.png
Try changing the CSS for your #container
div to: 尝试将
#container
div的CSS更改为:
div#container {
text-align: right;
position:absolute;
right:0;
bottom:0;
}
Try this 尝试这个
div#container {
text-align: right;
position:fixed;
right:0;
bottom:0;
}
Something like this: http://jsfiddle.net/dsri/WswG9/ ? 像这样的东西: http : //jsfiddle.net/dsri/WswG9/ ?
div#container{
}
div#a,div#b{
text-align:right;
margin: 0 100px;
}
Try This CSS 试试这个CSS
div#container{
text-align: right;
position:absolute;
right:0;
bottom:0;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.