column images full width responsive

2.4k views Asked by At

I'm trying make 2 images take up full width of 2 columns. I want the images to be responsive. This seems like it should be simple but im having problems. I'm getting confused on applying width to container, row, or using table. I would like it to look like the first 2 entry boxes under the carousel on this site minus the animation rollover. http://www.montere.it/?lang=en

<div class="container">
<div class="row">
<div class="col-md-6">
<div class="trans"> <img src="headertrans.jpg">
h3>The Latest</h3>
<p>From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.</p>
<p><a href="#">See how to travel on Airbnb</a></p>
</div>     
</div>  
<div class="col-md-6">
<div class="trans"> <img src="headertrans2.jpg">
<h3>Designs</h3>
<p>Renting out your unused space could pay your bills or fund your next vacation.</p>
<p><a href="#">Learn more about hosting</a></p>
</div>
</div>

my css:

.container{width: 100%; }

.trans{ transition:.all 0.9s ease;

}

.trans:hover { opacity: 0.1;

}

1

There are 1 answers

5
Michael Hommé On BEST ANSWER

Demo JSFiddle

Since it seems you're using Bootstrap, you'll want to do something like this.

HTML

<div class="container-fluid">
    <div class="row">
        <div class="col-xs-6 text-center box left">
            <h3>The Latest</h3>
            <p>From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.</p>
            <p><a href="#">See how to travel on Airbnb</a>
            </p>
        </div>
        <div class="col-xs-6 text-center box right">
            <h3>Designs</h3>
            <p>Renting out your unused space could pay your bills or fund your next vacation.</p>
            <p><a href="#">Learn more about hosting</a>
            </p>
        </div>
    </div>
</div>

CSS

.box{min-height:200px;}
.left{background:url("http://cdn.cutestpaw.com/wp-content/uploads/2012/07/l-Wittle-puppy-yawning.jpg"); background-size:cover}
.right{background:url("http://cdn.cutestpaw.com/wp-content/uploads/2012/07/l-Wittle-puppy-yawning.jpg"); background-size:cover}