Check out this CodePen:
https://codepen.io/jossnaz/pen/BMwpjR
HTML
<br>
<div class="" style="
">
<span class="" style="">
Lorem ipsum nunc hendrerit imperdiet aliquet class massa suspendisse libero, enim condimentum himenaeos hendrerit torquent pellentesque per euismod, velit molestie eleifend per rhoncus feugiat fermentum proin.
Suspendisse porttitor diam egestas curabitur malesuada netus enim bibendum, lacinia integer suscipit sem taciti ut nisi nunc, vivamus neque tempor dictum pretium condimentum litora.
Litora primis justo commodo posuere id nullam lacus tempor sociosqu cubilia auctor, nulla maecenas cubilia lacus quisque malesuada risus viverra mattis senectus porttitor ligula a fringilla dui elit nulla hendrerit in condimentum tortor.
Sollicitudin cursus augue semper sodales vitae pel
</span>
</div>
CSS
div{
max-width: 500px;
width: 500px;
background-color: cornflowerblue;
}
blockquote, span{
padding-left: 50px;
background-color: salmon;
position: relative;
&:before {
content: '“';
position: absolute;
left: 0;
top: 6px;
font-size: 4.8rem;
font-style: italic;
line-height: 0.75;
text-align: left;
color: green;
font-weight: normal;
}
}
Result shows an overflowing element:
https://i.sstatic.net/pq5IP.png
What am I looking for? I want the salmon red inline element to stop overflowing its parent. I still want to use :before
and maintain it as an inline element.