At 03:16 PM 10/25/2005, [EMAIL PROTECTED] wrote:
Is there any 'correct' way to get paragraphs to remain block level elements but to only act as though there is a break tag between them? I have tried setting the margin-top to one negative em value ( P + P { margin-top: -1em; } ) and that seems to work pretty good but is there any other method that's less of a hack?


Christian,

Browsers come equipped with default stylesheets. The gap you see beneath each P tag is assigned by a margin-bottom value (1em?) in your browser's default stylesheet. You can override that by setting the margin-bottom to zero or any other value.

Because different browsers come with somewhat different style defaults, many developers have gotten into the habit of zeroing out such values at the beginning of our stylesheets, for example:

        *
        {
                margin: 0;
                padding: 0;
        }

This puts browsers on a common footing and makes it easier to style consistently cross-browser without 'hidden' styling contributing irksome surprises. The price for that degree of control is the concomitant responsibility for assigning margins & padding to all elements, as desired.

Paul
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to