I have a logo aligned in the center, and when I adjust the screen/window width it keeps in the center perfectly. To the left of the logo I have a small menu with only two words, I want this menu/div to always be between the logo and the left edge.
Can this be done with only CSS?
To consider is that the logo has its own widht 200px
but I can fix this with margin-left: -100px;
.
And when it comes down to a screen size where it no longer fits to the left!, I will put it under the logo with @media screen and (max-width: px) { ... }
.
Like this: http://postimg.org/image/v148gyc9b/
If the logo has a fixed size of 200px, you can try something like this :
#menu {
position: absolute;
top: 0;
bottom: 0;
width: calc(50% - 100px);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With