Fractal Moonshine wrote:
> My first CSS experiment, after many years of HTML 3.2:
> 
> http://dougkh.nfshost.com/terry/index.html
> 
> What's the best way to give the paragraph in the middle of the right 
> side of the page a margin? When I add a margin, padding, or a 
> percentage width to #main p { }, all the space is on the right side 
> of the wrapper. #wrapper, the grandparent of #main, has a 30px margin
>  and 10px padding all around. I'm surprised #main didn't inherit 
> those values.

Margins and paddings are not inherited.
Margins will also go under floats, so only the element-content will be
kept free of the float.

In your case the easiest solution may be to add a margin to the float,
something like...

#photo {
    float: left;
    margin-right: 10px;
}
...for a nice line-up of text at the right side of that image.

regards
        Georg
-- 
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