Bootstrap div与图像接下来另一个div

时间:2015-07-04 11:43:02

标签: html css twitter-bootstrap

我正在尝试做下一件事:

enter image description here

所以我试过了:

http://jsfiddle.net/7ewrM/22/

<div class="container">
    <div class="row-fluid">
        <div class="col-xs-4">
            <div class='img-container'>
                <img src='http://graph.facebook.com/112845672063384/picture?type=square' />
                <div class='img-text'>Mark zuckerberg</div>
            </div>
        </div>
        <div class="col-xs-8">
            some text
        </div>
    </div>
</div>

任何帮助表示赞赏!

1 个答案:

答案 0 :(得分:2)

.container {
    border: 1px solid red;
    padding: 0;
}
.img-container{
    padding: 0 10px;
}
.imggg {
    display: inline-block;
    width: 25%;
    padding: 10px;
    border-right: 1px solid red;
}
.text {
    width: 70%;
    display: inline-block;
}
.marc-zuckerberg{
    border-top: 1px solid red;
    width: 100%
    display:inline-block;
}



<div class="container">
    <div class='img-container'>
        <div class="imggg">
            <img src='http://graph.facebook.com/112845672063384/picture?type=square' />
        </div>
        <div class='text'>text</div>
    </div>
    <div class='marc-zuckerberg'>Mark zuckerberg</div>
</div>

在这里:http://jsfiddle.net/7ewrM/24/