I am making a header with 2 images as below:
<div id="header-logo">
<div class="header-logo"><img src="logo.png"></div>
<div class="header-name"><img src="logo-name.png"></div>
</div>
with the following css:
#header-logo { width: 538px; margin: 0 auto; }
#header-logo div { display: inline; height: auto; }
#header-logo div.header-logo { width: 183px; }
#header-logo div.header-name { width: 355px; }
The problem is that unless I make the parent div (#header-logo
) 542px or bigger the child divs go below each other, I don't understand why as 183 + 355 = 538, where is the extra 4 pixels coming from?