Reputation: 14370
I am new to this bootstrap. I have a background image which i want to put in the container fluid. How to do it.
This is my code:
<div class="image_outer">
<div class="container-fluid">
<div class="row-fluid">
<div class="span5">
<div class="fl navi"> <a href="#" title="One" class="mr30">One</a> <a href="#" title="two">TwoP</a> </div>
</div>
<div class="span2"">
<div id="image1"><img src="/Something/something.jpg" alt="" /></div>
</div>
<div class="span5">
<div class="fr navi"> <a href="#" title="three" class="mr30">Three</a> <a href="#" title="four">Four</a> </div>
</div>
</div>
</div>
</div>
The corresponding classes are
.image_outer{width:100%;margin:0 auto; background:url(Something/something_bg.jpg) repeat-x; height:128px;}
.fl{float:left;}
.fr{float:right;}
.mr30{margin-right:100px; font-family: ee_nobblee,arial;}
.navi a{ font-size:22px; color:#6D6E70; margin-top:50px; float:left; font-weight:normal; font-family:ee_nobblee,arial;}
.navi a:hover { text-decoration:none; color:#858687;}
Upvotes: 2
Views: 4273
Reputation: 11
Try This CSS:
.image_outer {
width:100%;
margin:0 auto;
background:url(Something/something_bg.jpg) repeat-x;
height:128px;
background-position:cover;
}
Upvotes: 1
Reputation: 1453
I might be wrong, you are floating children. you need to clear the float so that the background takes up the height specified.
<div class="row-fluid">
<div class="span5">
<div class="fl navi"> <a href="#" title="One" class="mr30">One</a> <a href="#" title="two">TwoP</a> </div>
</div>
<div class="span2"">
<div id="image1"><img src="/Something/something.jpg" alt="" /></div>
</div>
<div class="span5">
<div class="fr navi"> <a href="#" title="three" class="mr30">Three</a> <a href="#" title="four">Four</a> </div>
</div>
<div style="clear:both"></div>
</div>
Upvotes: 0
Reputation: 1498
Use your code like this and I hope this will work for image
.image_outer{width:100%;margin:0 auto; background:url(../Something/something_bg.jpg) repeat-x; height:128px;}
Upvotes: 0