+ 1

Why does this white recktangle exist, although i declared 25%width + 75%? And i declared 100 height but its still surrounded

Im making my first experiences with html. And my layout wont lock like i want it to do. https://code.sololearn.com/WxDNI1vc6YZN/?ref=app

18th Jan 2019, 4:28 PM
Pjascha D
4 ответов
+ 2
Remain section width in 75% You are almost there. Just add box sizing to border box and set display inline block for nav and section. Without inline block, the width setting is not taking effect. Add the following css at the top of your css * { box-sizing: border-box; } nav, section { display: inline-block; }
18th Jan 2019, 5:07 PM
Calviղ
Calviղ - avatar
+ 1
//White is appearing because section is only of 75% of 100% make section 100% to cover white field ; //yoi thought of giving nav 25% and section 75% thinking of covering total 100% but it doesn't work like this every elements width is relative of screen display header{ padding:5px; } section{ width:100%; }
18th Jan 2019, 4:46 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 1
Thanks alot 😊
18th Jan 2019, 7:45 PM
Pjascha D
0
I tryied it with 100% but it still doesnt work, and the nav is still surrounded by the section
18th Jan 2019, 4:59 PM
Pjascha D