This is a discussion on "Basic float/clear question" within the Web Page Design section. This forum, and the thread "Basic float/clear question are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Basic float/clear question
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Basic float/clear question
Hi,
I have what I am sure is a very basic CSS float/clear question, but the float guides I've found don't seem to address it. OK, I have two types of elements. Images (made block-level) that are set to both float and clear right, and paragraphs that are set neither to float nor clear. These occur in the order:
However, if the first paragraph shrinks, IE6 (compliant mode) and FF (ditto) give me two different behaviours and I'm not sure which is right.
I actually WANT the IE behaviour. But first off, I want to make IE compliant, and THEN make both IE and FF do what I want. Any tips? EDIT: Here's a fixed-width approximation to the discrepancy: "Big enough" paragraphs
Last edited by rawling; Jul 18th, 2007 at 15:24. |
|
|
|
|||
|
Re: Basic float/clear question
1. Do a Google search for 'text wrap + images'. There are various tutorials available for styling images and text.
2. I had success putting each image into a separate div; in each div float the image right (or left). The flow of the divs will mean that each div should line up vertically (as your diagram), but the images will be floated right. You don't need anything cleared right. The problem seems to be your in-line styling; two images and two text paras fighting for position. Hope that helps. |
|
|||
|
Re: Basic float/clear question
Hi,
thanks for the reply - despite the question, I am quite adept at CSS, and can easily force FF to display the IE way. However, I'm curious as to which was is technically -right-, and whether there's a "trick" to making IE get into line if it's wrong (like the hasLayout property is a trick for some other stuff). |
|
|||
|
Re: Basic float/clear question
My guess is FF is right... at least that's my theory. FF is usually correct versus IE's chicken soup.
|
|
|||
|
Re: Basic float/clear question
I don't like IE hacks. I'd rather just send it its own stylesheet. Makes life a lot easier. You gotta love those MS Developers for making our lives easier with Conditional Comments
Pete. |
![]() |
| Tags |
| clear, float |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A couple of basic question- please. | dhall | Starting Out | 7 | Aug 17th, 2007 18:41 |
| Basic JS question | klonopin | JavaScript Forum | 1 | Mar 15th, 2007 00:31 |
| float question... | asa_carter | Web Page Design | 4 | Aug 27th, 2006 00:18 |
| Probably very basic CSS question | JonRouston | Web Page Design | 3 | May 18th, 2006 12:08 |
| Basic XML question | fogofogo | Other Programming Languages | 2 | Nov 23rd, 2005 08:58 |