Background-image doubt in css

i have added my code for background-image in css but the image moves completely to left i cant figure it out can you help me out?

this is the code in html:

<div class="site-content">
	<div class="hella">
		<h1 class="quote">Coffe is the best thing to start your day with.
		</h1>
	</div>
</div>

and this is the css code:

.hella{
	background-image: url("background-image.png");
	height: 700px;
	width: 100px;
	text-align: center;
}
.quote{
	color: whitesmoke;
	font-family: "Helvetica Neue";
	position: relative;
	top: 10%;
}

i got it solved thanks

Hi @160418735048,

It will be great if you share about “How did you solve your issue ?”. It will others also.

I was giving the width of the image as 100px instead of the entire width as 100%.

1 Like