How do I stop the white 'menu' div from overlapping the 'logo' div when the page is too narrow?
<style>
.container {
height: 60px;
background: yellow;
position: relative;
}
.menu {
position: absolute;
right:0;
bottom:0;
background: white;
}
.logo {
width: 300px;
height: 60px;
background: #99cc99;
}
</style>
<div class="container">
<div class="menu">
menu menu menu menu menu
</div>
<div class="logo">
logo
</div>
</div>
See this fiddle:
https://jsfiddle.net/932tL785/1/
I'd like the 'menu' to wrap when there's not enough room, but to unwrap when the window is wide enough not to overlap.
The bottom edge of the menu needs to be aligned with the bottom edge of the logo. The right edge of the menu needs to be aligned with the right edge of the container.
The logo has a fixed width & height, but I cannot rely on a specific height for the menu as it's dependent on font size.