Can’t get rid of padding at the top of header on homepage
-
I can’t get rid of this padding that just suddenly appeared at some point on my homepage, it only seems to appear on the homepage and no other page and I can’t get rid of it
The blog I need help with is: (visible only to logged in users)
-
after a couple tries of trying to solve it with gpt 3.5 the below code helped me fix it
body.home::before {
content: “”;
background-image: url(‘http://www.hideoutsmp.net/wp-content/uploads/2024/06/2024-06-10_23.36.43.jpg’);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
position: absolute;
top: 0;
left: 00;
width: 100%;
height: 1080px; /* Adjust height as needed / z-index: -1; / Ensure it is behind other content */
}body.home .content {
position: relative;
z-index: 1;
padding-top: 100vh; /* Push the content down */
}/* Ensure no margin or padding on body and html */
body.home, html {
margin: 0;
padding: 0;
}
- The topic ‘Can’t get rid of padding at the top of header on homepage’ is closed to new replies.