Might removing the title in the page edit form work for you?
Thread Starter
mbam7
(@mbam7)
Hi Konstantin. If you do that then the title of the page is not displayed but the blank space remains. My aim is to remove the space from all of the pages on my website. The other problem is that if you remove the title from all of the pages then they would all have no title.
In your file “style.css” locate this:
.site-header {
padding: 1.71429rem 0;
}
Replace with this:
.site-header {
padding: 1.71429rem 0 0 0;
}
This should be close enough. If you want even less space, additionally locate this:
.site-content {
margin: 1.71429rem 0 0;
}
Replace the 1.71429rem
with a smaller value like 1rem
or 10px
or even less like this:
.site-content {
margin: 1rem 0 0;
}
Thread Starter
mbam7
(@mbam7)
Ov3rfly – thanks for reply
The code in the style.css looks like this
/* Header */
.site-header {
padding: 24px 0;
padding: 1.714285714rem 0;
I did not touch the first line (padding: 24px 0;). I changed padding: 1.714285714rem 0;
to padding: 1.71429rem 0 0 0;
but it didn’t do the trick!
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Make sure you don’t update your theme until you transfer changes made into a Child Theme, otherwise you’ll lose your changes.
This is a reason why editing themes’ (not custom built) files is discouraged.
With the usual caveat about setting up a child theme – you should find that the following will remove the background at the top:
html, body .site {
margin-top: 0px
}