Forum Moderators: not2easy

Message Too Old, No Replies

Class inside a class.

         

tonynoriega

2:53 pm on Apr 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have two classes that split up a wider div ID into two parts. left and right.

i placed an image within .sponsor-left, and gave it a class of "left" but the image is not floating left...?

the img is only 175px wide, so it should have some room to slide left right?

for some reason, when the image with its class of "left" is inside the .sponsor-left, it wont float left?

what am i doing wrong?

.sponsor-left{
border-left:1px solid #d5e1eb;
border-bottom:1px solid #d5e1eb;
border-right:1px solid #d5e1eb;
width:219px;
float:left;
margin:3px 1px 3px 25px;
padding:5px;
min-height:50px;
}

.sponsor-right{
border-left:1px solid #d5e1eb;
border-bottom:1px solid #d5e1eb;
border-right:1px solid #d5e1eb;
width:219px;
float:left;
margin:3px 0px 3px 1px;
padding:5px;
min-height:50px;
}

img.left{
float:left;
}

simonuk

3:06 pm on Apr 1, 2009 (gmt 0)

10+ Year Member



Without seeing the way your HTML is implemented it is hard to say. Are you sure you have given the img a class of left?

tonynoriega

3:11 pm on Apr 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<div id="sidebar">

<h3 class="blue">All Event Sponsors</h3>

<div class="sponsor-left">
<img src="../images/foundation-logo.gif" alt="Blue Cross of Idaho Foundation for Health" class="left" />
</div>
<div class="sponsor-right">

</div>
</div><!-- close sidebar-->