Climis, Tim wrote:
>> {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?
Currently the width does nothing (please see below for reason).
[...]
> 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)
This is the current CSS.
.floatL {
float:left;
margin: 0 1 em 1em;
padding: 0.25em;
}
Since IMG are inline elements, then any margin or width values will
not be used. For the margin and width values to work, one must make
the IMG display as a block element.
.floatL {
float:left;
margin: 0 1 em 1em;
padding: 0.25em;
display: block;
}
To see what the margin and padding values are actually doing, play
around with this CSS.
.floatL {
float:left;
display: block; /* width and margin values are used */
border: 5px solid blue;
margin-top: 50px;
margin-right: 50px;
margin-bottom: 50px;
margin-left: 50px;
padding-top: 50px;
padding-right: 50px;
padding-bottom: 50px;
padding-left: 50px;
}
--
Alan http://css-class.com/
Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
______________________________________________________________________
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/