0

[SOLVED] Problem with CSS flex in HTML Main Conent and Sidebar

I want to display 2 items in a row in main content and the main and sidebar divs to stay side by side, but the sidebar goes bottom of main div. And footer at the bottom will have full width. What is the problem here. https://code.sololearn.com/W70tsXgdxgzt/?ref=app

5th Dec 2020, 3:12 AM
Bibek Oli
Bibek Oli - avatar
3 Answers
+ 3
.main > p { width: 48%; background:#555; margin:1px; display:inline-block ; }
5th Dec 2020, 6:20 AM
Avinesh
Avinesh - avatar
+ 3
Apply flex to the body. body { margin: 0; display: flex; flex-wrap: wrap; }
5th Dec 2020, 3:58 AM
Avinesh
Avinesh - avatar
0
Avinesh that code created lot of UI problems in my page. PLEASE check my updated code, I just want to make the .main to display 2 items in one line.
5th Dec 2020, 6:03 AM
Bibek Oli
Bibek Oli - avatar