I'm struggling with positioning three elements within a div. The left element needs to be on the left, the middle element centered, and the right element on the right.
Here's what I have so far in my CSS:
#left-element {
margin-left: 9px;
margin-top: 3px;
float:left;
width: 13px;
}
#middle-element {
margin:0 auto;
text-align: center;
width: 300px;
}
#right-element {
float:right;
width: 100px;
}
And this is my HTML structure:
<div id="container-div">
<div id="left-element">
<img src="images/left_element.png" alt="left"/>
</div>
<div id="middle-element">
I am the text inside the middle element
</div>
<div id="right-element">
I am the text in right element
</div>
</div>
Any suggestions or ideas on how to fix this?
Appreciate your help!