Mike Breiding wrote:

> I added 'clear: left' to the rules for the '.leftImg' class. This
> does the job in FF, but in IE 6 it forces the first paragraph to the
> far right into a very narrow column.

That's because you have a 'width' on paragraphs, which to IE/win means
'hasLayout'[1] and non-standard behavior. There are several triggers for
IE's non-standard behavior in your styling - general use of 'position:
relative' for instance, so especially IE6 creates problems.

There's also severe problems caused by the 'auto-expansion' bug in IE6
(and older) on narrow windows, and some problems both on very narrow and
very wide windows in all browsers.

Major debugging necessary if you want stability in the most used IE/win
versions, but it isn't too bad since problems are mostly caused by
"over-styling", and the HTML source-code is generally sound.

> Back to the P container for images: I should then create another
> class for the rest of my images which will replace any styling
> applied by a P tag?

Generally, yes, another set of styles -- see below.

> Currently all my images are wrapped in P tags, which I now understand
> is not appropriate.

I'm not saying "having images inside paragraphs is wrong", as "right" or
"wrong" here depends on _why_ you have those images in paragraphs.

- What I am saying is that you do not need paragraphs (or other
elements) as "wrappers" for styling and positioning of images, as images
can be styled directly.

- Sometimes you want images to interact with text - text-wrapping around
the image for instance. In such cases you may as well place the image in
the paragraph along with the text.

An example from your page with such a change...

<p><img class="leftImg" src="states_cov_cr.jpg" width="120" height="130"
alt="" /> It's June 2, 1977, and I am on I-79 in Pennsylvania ...
</p>

This allows for more flexible and efficient styling, as the paragraph
_and_ the image inside it can be styled. You can also have different
style-rules for images depending on whether they're inside or outside
paragraphs (or other elements), which provides you with more detailed
and targeted control of final presentation.

For more on how to control/position floats - images and otherwise - see...

<http://www.gunlaug.no/tos/moa_16.html>

----------------------------------------------------------------------
Tim Dawson asks:

> Can you have both a 'float' and a 'clear' in the same style ?

Sure, no problem.

That is: especially IE6 can produce serious problems in some cases,
since that old thing is - well - pretty buggy.

I often have to add extra clearing-elements and other "strange"
solutions to make IE6 behave - especially since I prefer to keep IE6 in
quirks mode. Maybe that's why I'm generally more focused on
functionality than minimalism and purity :-)

regards
        Georg

[1]http://www.satzansatz.de/cssd/onhavinglayout.html
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to