Try putting an overflow:hidden in your .float parent class.

It tends to help me float things in a page.

On Jul 5, 2008, at 7:05 AM, akella wrote:

@Essential, there is no image, the number in green block is text. It has some padding and background-image (left-top corner). And it is already floated, because it is .float1. Any ideas?

The real life code for those images looks like this:
                        <dl>
                                <dt>30</dt>
<dd><strong>Commodore645</strong> <span><a href="#">add present</ a></span></dd>
                        </dl>
I can give a link to live demo, but i just want to simplify it for the list. The abstract float1 float2 example is just my problem...

С уважением,
Юрий "akella" Артюх,
http://cssing.org.ua,


On Sat, Jul 5, 2008 at 1:54 PM, Essential eBiz Solutions Ltd <[EMAIL PROTECTED] > wrote:
From what I can see there it's because of the image you are using.


Try

.float1, .float2, .float{

float:left;

}

.float1 img {

            height: 20px;

            width: 20px;

            float: left;

}



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of akella
Sent: 05 July 2008 11:38
To: [email protected]
Subject: [WSG] Nowrap for floats


Hi list! Got a CSS question, it's now two days in my head.
Here is my HTML, just to be abstract:

<div class="float">
  <div class="float1></div>
  <div class="float2>Some random text</div>
</div>
and smth like this in CSS:
.float1, .float2, .float{float:left}

My problem is that i need .float1-2 to be on the same line.
Here is how it should look like: http://cssing.org.ua/a/2.png
But it breaks like this: http://cssing.org.ua/a/1.png
(the text and the green block are two floats, the block itself is a float)
So i need something like nowrap-for-floats.

I solved this problem for Safari, FF, Opera by:
.float{display:table}
.float1, .float2{display:table-cell}

But that doesn't work in IE. May be someone got such an experience? Fancy ie-expression? i would highly appreciate any ideas on this subject.

Thanx in advance!

regards,
Yuriy "akella" Artyukh,
http://cssing.org.ua


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to