I am trying to style a header text with a border around it. The issue arises when the larger text spans over two lines, causing the border to break in between. In an attempt to fix this, I applied the CSS property box-decoration-break: clone;
. However, this results in the text being split into two separate blocks as shown in the attached screenshot. Is there a way to ensure that the border is displayed completely around the text?
The desired outcome should look like this:
This is how the HTML should be structured:
<span class="border-title">
LOREM IPSUM DUMMY CONTENT LOREM IPSUM DUMMY CONTENT
</span>
The following CSS Style needs to be implemented:
.border-title {
color: #264755;
text-transform: uppercase;
font-size: 24px;
border: 1px solid #3cadca;
padding: 10px 20px 5px;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}