I would like to contain page logo and nav in the same header container - logo on the left, nav container on the right. How to make SVG logo embedded inline properly scale to always fill 100% of its container (header) height and auto scale width - at the same time staying on the left of the container? (Do I need separate <div>
to wrap <svg>
container?)
Probably I have to set svg viewBox property, but I'm not sure about how to do it to be sure that it will be responsive and render properly in different resolutions)?
My code:
HTML:
<header id="page-header">
<svg id="logo"
xmlns="http://www.w3.org/2000/svg">
<path d="..."/><g></g>
</svg>
<nav id="page-nav">
<a href="...">...</a>
...
</nav>
</header>
CSS:
#page-header {
height: 9em;
padding: 0;
margin: 0 0 6em 0;
}
#logo {
padding: 0;
width:600px; //not working at all.
vertical-align:top;
float:left;
display:inline-block;
}
#page-nav {
float:right;
...
}