Bri*_*ian 10 css positioning absolute css3 twitter-bootstrap
我似乎无法使用twitter bootstrap框架获得div在其父级中的绝对位置.我有一系列遵循以下方案的行
<div id='wrapper'>
<div class='row-fluid'>
<div class='span2'>some content here</div>
<div class='span9'>other content to the side of the first div</div>
<div class='timestamp'>123456 this should align to the bottom right of wrapper</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
.timestamp{
position:absolute;
bottom:0px;
right:0px;
}
Run Code Online (Sandbox Code Playgroud)
但是时间戳div总是将自己定位到整个dom文档的主体的绝对值,忽略任何中间div.是什么原因引起了这个?
Nic*_*ing 20
你的CSS应该包括
#wrapper {
position: relative;
}
Run Code Online (Sandbox Code Playgroud)
默认定位是静态的.
看看这篇文章:http: //css-tricks.com/absolute-positioning-inside-relative-positioning/
归档时间: |
|
查看次数: |
33729 次 |
最近记录: |