It's not clear whether or not you want the repeating background images, but the foolproof way to say "I want X after Y" is to make them different, consecutive elements in the DOM order. Something like
header{
background-image: url("https://sputnick.fr/header.jpg");
height: 200px;
width: 100%;
}
h1{
color: white;
}
<header>
<h1>
Site Title
</h1>
</header>
<main>
<p>
Some content
</p>
<p>
Some more content
</p>
</main>
If you DO want the background-image to repeat throughout your entire webpage, you have lots of options, but I would probably do something like this
.wrapper{
background-image: url("https://sputnick.fr/header.jpg");
height: 800px;
width: 100%;
color: white;
}
.content{
margin-top: 650px;
}
<div class="wrapper">
<h1>
Site Title
</h1>
<div class="content">
<p>
Some text
</p>
</div>
</div>
This does rely on a hard-coded margin-top that matches the height of your background-image - if this height ever changes, then this code will break. If that is a likely scenario, then you could also consider doing kind of a tandem of both approaches
body{
background-image: url("https://sputnick.fr/header.jpg");
color: white;
}
h1{
position: absolute;
top: 0;
}
<body>
<header>
<img src="https://sputnick.fr/header.jpg">
<h1>
Site Title
</h1>
</header>
<main>
<p>
Some content
</p>
<p>
Some more content
</p>
</main>
</body>
This has the disadvantage of relying on position: absolute
, but will behave better if you ever change your background image's dimensions.
Hopefully this gives you some ideas to work with!