I don’t know why the text in my HTML page is collapsing inside the menu, here you can find my page in jsfidle.
Some of my HTML file:
<div class="menu">
item 1
item 2
...
</div>
<div class="content">
text text text
</div>
Some of my CSS file:
.menu{
float: left;
padding-top: 100px;
width: 20%;
position: relative;
}
.content{
float: right;
padding-top: 100px;
width: 80%;
color: #dddddd;
position: relative;
}
Is it a css problem with the width %? Or something else?
You’re defining
.menuand.contentas being20%and80%the width of the window – your containers are being sized properly.However, you’ve set a width of
150pxand padding of30pxon your.grezzonodes, which causes them to expand outside of the.menudiv (if the window is too small)Try removing the width on
.grezzo