CSS Border box height | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

CSS Border box height

So the border height is staying the same as the li textsize. How do i make it so it covers the whole height of the div? Dont want to make the text bigger, just make the border fill up the height. Using atom btw if that helps. Shortened down the code, only the relevant code is shown hoefully. HTML code: <body> <header id="header"> <div class="container"> <h1 class="headerblock">Sal_Toosh</h1> <nav> <ul> <li class="navblock"><a href="Blog.html">Home</a></li> <li class="navblock">Discussion</li> <li class="navblock">Projects</li> </ul> </nav> </div> </header> CSS code: /*Header and Nav*/ #header{ font:10px; color:white; background:black; min-height:80px; padding-top:40px; border-bottom:3px solid blue; } .headerblock{ float:left; width:40%; } .navblock{ float:left; width:20%; border-left:2px solid blue; border-radius: 10px 0px 10px 0px; box-sizing: border-box; }

31st Jul 2020, 11:03 AM
Prog - avatar
3 Answers
+ 2
Add padding
31st Jul 2020, 12:15 PM
Calviղ - avatar
31st Jul 2020, 11:08 AM
The future is now thanks to science
The future is now thanks to science - avatar
+ 1
Ty for the replies, didn't realize I already had padding from header so it was messing up everything.
31st Jul 2020, 3:15 PM
Prog - avatar