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.

and this is the css code:

	background-image: url("background-image.png");
	height: 700px;
	width: 100px;
	text-align: center;
	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