Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS inline-block margins don’t overlap

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #45205
    mattiafrigeri
    Participant

    Hi all, I have this situation:

    P + margin bottom of “p” + “figure” top margin + FIGURE

    P is block level, while FIGURE is inline-block.
    Margin between should be 30px, but I see it as 50px! (they don’t overlap!)

    Is it correct!?

    thanks!

    #137054
    Paulie_D
    Member

    Probably not but you aren’t being very specific.

    Is this an issue in a specific browser, a specific browser version?

    Have you used a reset / normalize css?

    Do you have a link we could look at?

    https://css-tricks.com/how-to-ask-a-good-question-in-the-forums/

    #137056
    mattiafrigeri
    Participant

    Sorry Paulie you are totally right!
    I am asking this question because if you know that this is a common behaviour, than discussion “closed”.

    Now that you tell me that it is not expected, then I’ll prepare my question better.

    For now I can only tell that I am using reset CSS by Meyer.

    thanks

    #137059
    Paulie_D
    Member

    Frankly it depends on what we can look at.

    We don’t know what the margins you mentioned are actually set at other than **apparently** they should total 30px.

    That’s why we need to see it happening in real time…hence a link to a live site would be the best option.

    #137062
    wolfcry911
    Participant

    It’s correct behavior – margins of inline-block elements _do not_ collapse.

    #137071
    mattiafrigeri
    Participant

    ah thanks then! Does W3C states it somewhere? Just to write it down once for all… ;)

    #137076
    wolfcry911
    Participant
    #137245
    mattiafrigeri
    Participant

    Thanks wolfcry ;)

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.