0
I want to create a side menu and its format will be widht: 250px and height: 100% leaning on the left corner of the browser, but when you put these qualities in css, the div doesn’t get 100%, it’s only the size of the <ul> and with an upper and lateral-left spacing.
Welcome to Stackoverflow! Please explain the problem better, and if possible include a example of code that reproduces what is happening, because your question is not noticeable. See Help Center How to Ask.
– Taisbevalle
You’ve already defined the heights of the elements
htmlandbodyalso?– Woss
Not yet Anderson, I am now learning html and css and this is my first project alone that I am creating. So far so:
.longBar
 {
 width: 250px;
 height: 100%;
 background-color: rgb(66, 79, 90);
 }– GenSkywalker
Set the widget height to
100%makes it fit the height of its parent element. If it does not occupy the entire screen as well, it will not work as expected. Set the heights ofhtmlandbodyas100%also and will have some result. Something likehtml, body { height: 100%; }.– Woss
Well said Anderson!. I defined
body { height: 100%; postion: absolute }and my div longBar putheight: 100%; position: relative. It worked! Thank you!– GenSkywalker