0

CSS: Two inline DIV-elements, one with fixed width, the other fills the rest of the screen

I have two DIV-elements, which I want to position next to each other (inline). The first element is a menu (left), and the second element is the content (right). The menu should have a fixed width of 100px, while the content should fill the rest of the screen (100%). The css: menu {float:left; width:100px;} content {float:left; width:100%} This displays content as a block element under the menu, and it's supposed to be next to it instead. How should I tackle this? I hope to make my site more mobile-friendly with this.

24th Feb 2018, 10:22 PM
Spisepause
2 Antworten
0
use javascript to set the second div to fill the remaining screen
24th Feb 2018, 10:47 PM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
0
I have a project in playground that may be what you mean.
24th Feb 2018, 10:48 PM
Toni Isotalo
Toni Isotalo - avatar