I've been attempting to accomplish something without success. The image below should speak a thousand words.
My goal is to position div 3, located in div 2, perfectly centered between div 1 and 2 to achieve the desired outcome:
Here's my HTML and CSS code:
HTML
<div id="container">
<div id="leftSide">
<!-- 1. -->
</div>
<div id="rightSide">
<!-- 2. -->
<div id="circle">
<!-- 3. Contains the image -->
</div>
</div>
</div>
CSS
#container{
width: 600px;
float: left;
padding: 0;
margin: 0 auto;
}
#leftSide{
width: 300px;
height: 300px;
float:left;
background-color: blue;
}
#rightSide{
width: 300px;
height: 300px;
float:left
background-color: red;
}
#circle{
width: 100px;
height: 100px;
margin-left: 30px;
background-color: black;
}
I'm open to suggestions on how to approach this problem. Thank you for any assistance provided. Much appreciated.