Domanda

I am not sure why contactBox is overlapping the mainInfo box.The contact box is also not stretching to its parent container which is 960px.

CSS

.mainInfo {
position:relative;
height:500px;
background-color: pink;
padding:30px 0 0 30px;

}

.col-6 .imagePlaceholder {
width:300px;
height:420px;
background-color: red;
}

.col-6 .about {
position: absolute;
top:30px;
left:414px;
padding:1em;
}

.contactBox {
height:450px;
background-color:green;
}

Here is a JS fiddle: http://jsfiddle.net/2zm47/

È stato utile?

Soluzione

I would probably code this css differently, but checkout the

.mainInfo {
position:relative;
height:500px;
background-color: pink;
padding:30px 0 0 30px;

}

.col-6 .imagePlaceholder {
width:300px;
height:420px;
background-color: red;
}

.col-6 .about {
position: absolute;
top:30px;
left:414px;
padding:1em;
}

.contactBox {
height:450px;
background-color:green;
}

I hope this helps. I put a note in the JS section of the fiddle.

http://jsfiddle.net/emersive/84WeT/1/

Altri suggerimenti

Your HTML is messed up. Should be like:

<div class="container">
   <div class="mainInfo">
            <div class="col-6">
                <div class="imagePlaceholder"></div>
            </div>

            <div class="col-6">
                <div class="about">
                    <p>...</p>
                    <p>...</p>
                </div>
            </div>
    </div>

   <div class="contactBox"></div>
</div>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top