I know this is a srs beginner question, but here goes:
I am trying to get a box, with an icon in the top left corner, and all the content of that box will be to the right of the icon.
This is the code I am using:
<div class="statsbox float_left">
<img src="images/chart_bar.png" class="float_left">
<div class="float_left">
<p class="statsbox_header"> User Uploaded Images </p>
<ul class="statsbox">
<li class="statsbox"> 122 uploaded images </li>
<li class="statsbox"> 13 images pending approval </li>
<li class="statsbox"> 15 anonymous images </li>
<li class="statsbox"> 97 unique users </li>
</ul>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
it seems like it should work, but it turns into this:
the <div>
tags are outlined.
You can see that the <div>
containing the list overlaps the image for some reason.
Note: if the unordered list isn't in that div, then this works as expected. It's like the presence of bullets push it over further to the left.
Also note: this still doesn't work if I wrap the <img>
in it's own div.
What am I doing wrong here? The float_left class is predictably just float: left
, clear is just clear: both
, and the other classes are not defined yet, in case that is relevant.