Skip to main content
Hosun
Inspiring
Aug 21, 2019 9:27 AM UTC
Answered

padding?

Hi,

Looking at <header>, there is an image.

Where does the space at bottom come from?

Should I do more in addition to flexbox below?

header {

      background-color: #42A240;

      padding: 20px 40px;

     display: flex; /*title*/

     align-items: center; /*title*/

}

Global Invisible Hand

Hosun Kang

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Jon Fritz
    Jon FritzCorrect answer
    Community Expert
    Sep 12, 2019 1:44 PM UTC

    The answer didn't carry over from the old forum.

    This is caused by the browser's default padding on the <img> tag that needs to be removed.

    Adding vertical-align:bottom to the <img> tag's css fixes it.

    8 replies

    Jon Fritz
    Community Expert
    Jon FritzCommunity ExpertCorrect answer
    Community Expert
    Sep 12, 2019 1:44 PM UTC

    The answer didn't carry over from the old forum.

    This is caused by the browser's default padding on the <img> tag that needs to be removed.

    Adding vertical-align:bottom to the <img> tag's css fixes it.

    Translate
    B i r n o u
    Legend
    Aug 21, 2019 9:47 AM UTC

    il semblerait que votre document SVG contienne cet espace en dessous de votre lettre, propriété viewbox, essayer de remplacer votre logo par celui ci

    http://www.birnou.net/logo-a.svg

    Translate
    Hosun
    HosunAuthor
    Inspiring
    Aug 21, 2019 11:44 AM UTC

    Merci beaucoup pour votre réponse.

    J'ai ajouté

    .logo {

          display: flex;

          align-items: center;

    }

    Il semble que tout allie bien.

    Hosun Kang

    Translate