Seeking a solution for seamlessly fitting a background URL into a pattern using CSS/HTML.
Experimenting with applying negative margin to make the background image overlap in repetition.
Current approach involves using a DIV element, but negative margin only impacts the element itself, not the background image. Any suggestions?
Current HTML Code
<body>
<div class="bg"></div>
</body>
Current CSS Code
<style>
.bg{
background: url('./pattern.png');
background-size: 600px;
width: 100vw;
height: 100vh;
}
</style>
Result of the code above:
Any insights or assistance is greatly appreciated. Thank you.