With this HTML:
<img id="logo" src="logo.png" alt="Camaupoint">
When you set the size of your logo in
px and don't specify a size of it's parent the parent will get the size of it's content. But when you set logo's size in
% this percent should be calculated of some value and since it's parent don't have a specified width it's trying to rely on something, in this case there's only logo's native image width to rely on. In this way the parent will get a size of original logo's width and then logo will get calculated percent of it's parent size.
I can see 3 different ways to solve your problem:
vwunits instead of