> {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? >
The width is the width of whatever element you're applying the CSS to. Could be the image, but as Marcio pointed out, you didn't include the selector, so we don't know. > 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. That's not valid CSS. All non-zero measures need to have a unit. So I'm not sure what margin: 1 1em 1em would do exactly. But in general, it applies a margin of 1 (whatever that means) to the top margin, 1em to the right (and left) margin, and 1em to the bottom. "margin: 1em;" applies 1em to the top (and the bottom, and the right, and the left) "margin: 1em 2em;" applies 1em to the top (and the bottom), and 2em to the right (and the left). "margin: 1em 2em 3em;" applies 1em to the top, 2em to the right (and the left), and 3em to the bottom. "margin: 1em 2em 3em 4em;" applies 1em to the top, 2em to the right, 3em to the bottom, and 4em to the left. > Third, the padding. Why is it necessary and how is it affecting the the > flow of text around my images? Padding is like margin, except that it's inside the border (so background colors apply to it), and it doesn't collapse. So, if you had a border around your image, but you wanted some space between the image and the border, use padding. Or if you wanted a margin, but you wanted it to be green, you could use padding for that too. Or if you wanted the margins to not overlap on adjoining elements, you can use padding for that as well. Or if you need an inside margin and an outside margin, padding is the inside, and margin is the outside. (see below) > Finally, I need the images to indent 140 pixels like the text. Easy? Depends on your HTML. If all your images are in a container, you could put a padding-left: 140px on that, and it would do the trick. There are also other ways to do it. A link would help. ---Tim ______________________________________________________________________ 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/