Absolutely not. Avoid using overflow: hidden;
in a navbar.
overflow: hidden
has the potential to conceal important elements that should remain visible. It's best to steer clear of it unless absolutely necessary, which is not the case here.
Instead, apply clear: left;
on the paragraph.
li {
float:left;
padding:10px
}
ul {
float:left;
list-style:none;
background:grey;
width:auto;
}
p {
clear:left;
float:left;
width:100px
}
<ul>
<li>LIST</li>
<li>LIST</li>
<li>LIST</li>
<li>LIST</li>
</ul>
<p>
SOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXT SOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXT SOMETEXTSOMETEXTSOMETEXTSOMETEXT
</p>
Alternatively, you can use float: left; width: 100%;
on the <ul>
(navigation list).
li {
float: left;
padding: 10px
}
ul {
float: left;
list-style: none;
background: grey;
width: 100%;
}
p {
float: left;
width: 100px
}
<ul>
<li>LIST</li>
<li>LIST</li>
<li>LIST</li>
<li>LIST</li>
</ul>
<p>
SOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXT SOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXTSOMETEXT SOMETEXTSOMETEXTSOMETEXTSOMETEXT
</p>