0
How to prevent the overlap with other elements from happening? In this case the title QUICK ACCESS TO MAIN CHANNELS is superimposing the element below - Monazite sands
See example:
CSS:
p.acessorapido{
float: left;
width: 100%;
height: 38px;
max-width: 885px;
margin-top: 20px;
padding: 8px;
padding-left: 0px;
font-size: 20px;
box-sizing: border-box;
color: #eee;
border-bottom: 1px #C11C05 solid;
}
p.acessorapido span {
background-color: #C11C05;
padding:5px;
}
The width of your
span
is greater than that of thep
, then there is the line break. What is the expected result? That the red side edge was below only "Main Channels" without overlapping other content? By the way, what is the function offloat: left
there?– Woss
There are several aspects to be considered ai @Gladison, the ideal would be you also post the HTML code to make sure that this is wrong. From what I understand it’s floating because of
float:left
and so the bottom element fills the voids, a margin being considered "fillable" empty space when you have the float. Adisplay: block
can help, orinline-block
, or even aclear: both
depending on the case.– Karl Zillner