blank space after P, UL, Hx and so on

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Antoun

    blank space after P, UL, Hx and so on

    Hello,

    Is there a means, with CSS or else, to remove or resize the blank line
    after a P ? I've tried margin-bottom, padding-bottom, cell-spacing, and
    found nothing !

    Thanks for your answers !

    Antoun
  • Els

    #2
    Re: blank space after P, UL, Hx and so on

    Antoun wrote:
    [color=blue]
    > Hello,
    >
    > Is there a means, with CSS or else, to remove or resize the blank line
    > after a P ? I've tried margin-bottom, padding-bottom, cell-spacing, and
    > found nothing ![/color]

    Then you must have made a mistake somewhere, as it is the
    margin-bottom of the <p> element.

    Unless of course you were looking at the margin-top of the next
    element ;-)

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -

    Comment

    • Gus Richter

      #3
      Re: blank space after P, UL, Hx and so on

      Antoun wrote:[color=blue]
      > Hello,
      >
      > Is there a means, with CSS or else, to remove or resize the blank line
      > after a P ? I've tried margin-bottom, padding-bottom, cell-spacing, and
      > found nothing !
      >
      > Thanks for your answers !
      >
      > Antoun[/color]

      What Els is hinting at is:
      In HTML, extra leading is provided before and after every block element
      by means of margin-top and margin-bottom values.
      The extra leading of the preceding block's margin-bottom value and the
      following block's margin-top value is collapsed down to only one (or
      to the largest, if they are of different value).
      In order to remove the extra line leading between two block elements,
      you must use CSS to remove margin-bottom of the preceding element and
      margin-top of the following element, by setting them to zero.
      If you wish to create your own leading value between two block elements,
      give one of them the value of zero and the other the value that you want.

      --
      Gus

      Comment

      • Stan Brown

        #4
        Re: blank space after P, UL, Hx and so on

        "Antoun" wrote in comp.infosystem s.www.authoring.stylesheets:[color=blue]
        >Hello,
        >
        >Is there a means, with CSS or else, to remove or resize the blank line
        >after a P ? I've tried margin-bottom, padding-bottom, cell-spacing, and
        >found nothing ![/color]

        If you have

        <style type="text/css"> p {margin-bottom:0} </style>
        ....
        <p>para 1</p>
        <p>para 2</p>

        then the you will still see a blank line between paragraphs (in
        most browsers) because the default styling in most browsers is
        p {margin-top:1em; margin-bottom:1em}
        or similar. You see one blank line between, not two, because in CSS
        the bottom margin of one element merges with the top margin of teb
        next element.

        This means that you can't just think about bottom margins, you need
        to think about top and bottom margins.

        And before you just do
        p {margin-top:0; margin-bottom:0}
        think abut how readable your text will be if there's no space
        between paragraphs. At least you'd want to create a first-line
        indent.

        --

        Stan Brown, Oak Road Systems, Tompkins County, New York, USA
        Dragon222 adalah situs slot gacor terbaru yang selalu memberikan banyak bonus menarik dan kemenangan JP untuk pemain setia selama bermain di link slot DRAGON222.

        Comment

        • Antoun

          #5
          Re: blank space after P, UL, Hx and so on

          OK !

          I had found a heuristic solution, which was margin-bottom: -1em, but now
          I understand the whole thing !

          Thanks to you all !

          Antoun

          Comment

          Working...