On Wed, Aug 18, 2010 at 3:26 PM, Keith Purtell
<keithpurt...@keithpurtell.com> wrote:
> Making progress. As you kindly recommended, my images now use a float
> property for both left and right. Here's the glitch. In order to provide
> white space for text that flows around each one, I lifted the following
> code directly from Eric Meyer's book:
>
> {float: right; width: 15em; margin: 1 1em 1em; padding: 0.25em;}
>
> First, I don't understand width. It's not the width of my image; what is
> it doing?

Its a scalable width that will scale up or down if the user changes
the font size.

> Second, I especially don't understand how he has illustrated margin. Why
> do '1' and '1em' and '1em' follow each other that way, and what are they
> accomplishing.

Dunno really. What I do know is.

1 value: represents all four sides;

2 values: The top and the bottom is represented by the first value.
Left and right represented by the second value.

3 values: The first value is top. Second value is left and right and
the final value is bottom.

4 values: are Top, bottom, left and right.

see also http://www.w3schools.com/css/css_margin.asp

With this in mind it looks like a top margin of 1 without a unit which
doesn't makes sense to me. The subsequent 1em 1em represents
left-right and bottom of 1. I believe that certain browsers may take
this as a pixel magin.


> Third, the padding. Why is it necessary and how is it affecting the the
> flow of text around my images?

The padding is the area inside the border (if it exists). So if you
had a border arround the image it would have 0.25em background arround
the image. Try this with either a background-color or a border to see
the effect, Margin is the area outside. So basically your text would
start a quater of a charachter to the right of the image (if there was
no margin).


> Finally, I need the images to indent 140 pixels like the text. Easy?

The margin is usually used to indent in this way so you may have
something like margin: 0 1em 1em 140px

Dunno really if this is what you wanted. You should try playing with
margin + padding sometimes.
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
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