Archived topic
page header background overwrites body background
7 replies · Started by Hans on May 21, 2018
I want to use a full screen background on the homepage, I use a hook and a css.
This is my css:
#ktgbild {
position: fixed;
top: 0;
left: 0;
/* Preserve aspet ratio */
min-width: 100%;
min-height: 100%;
z-index: -1;
}
This is the wp_head hook:
<?php if ( is_home() ) : ?>
<img src='http://huppenb ---- rath/wp-content/uploads/bgimage/rotate.php' alt='' />
<?php endif; ?>
On many sites it worked. Now the page header overwrites the top of my homepage as you can see on my site.
Hi Hans, i am a litte unclear as to what the problem is. Do you want to remove the header image so the fixed background shows through?
Hi Hans, you simple need to remove the background image. Customiser > Background Image > Header and then set the header background color to transparent.
Hi David, I am sorry - this doesn't solve the problem. Now the header background image is gone on all pages/posts. I want to have it on all other pages/post - except the home page. Have a look on the examples I send you.
Hi Hans, you could just remove the header image on the home page with CSS:
.home .site-header {
background-image: none;
}
Great - this does the job!
Thanks!
You're welcome Hans glad you got it fixed