Div height not... being the div height

Okay, i’m sure this has been covered endless number of times, but my head cant draw the answer out of my head.

I have a DIV. I have set the DIV’s height to 30px. Element inspector says the height is 30px. Actual rendering on the page: 18px. … what?

h4, .blackbox {
    font-family: Rationale;
    text-transform: uppercase;
    font-size: 16px;
    line-height: 30px;
    height: 30px;
    display: inline;
    color: white;
    background-color: black;
    padding-left: 6px;
    padding-right: 6px;


The inline display doesn’t honor box vertical properties. :smiley:

Try inline-block and see if that works.


See, i knew it was something silly and easy like that. inline-block does indeed solve the problem.


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.