I set a global width, but I'm having trouble getting a specific element to exceed that limit. This element consists of text with a background image, and I want the image to extend beyond the width constraint. However, when I try to widen the element, the text also exceeds the specified width.
My attempt to manually increase the width of the element using width:150% resulted in the text exceeding the limit as well.
html, body {
font-size: 1em;
background: transparent;
display: block;
width: 1222px;
margin: 0 auto;
}.wrapperbody {
background-image:url("background.jpg");
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
width: 100%;
margin-top: 10%;
}
<div class="wrapperbody">
<div>
<h1>test</h1>
</div>
</div>
I've been trying to enlarge the background image of a specific text without affecting the entire text content.