Archived topic
Page title/ Margin
5 replies · Started by Jan on May 24, 2021
Hi David,
I did manage to adjust the position of the page title using the following CSS code snipped:
.entry-header h1, .page-header h1 {
margin-left: -40px;
margin-top: -40px;
}
Now I'd like to apply this to selective pages (e.g. page-id-6851). Where does the page-ID go in the generic code snipped in order to make that happen?
Thanks,
Jan
Hi there,
Try this:
body.page-id-9851 .entry-header h1, body.page-id-9851 .page-header h1 {
margin-left: -40px;
margin-top: -40px;
}
Hi Leo,
many thanks for getting back.
I added the CSS code snipped to the Customizer and corrected the page-id (6851 instead of 9851) but the page title is not changing ;-(
This may be because it is not a standard page but a "group" that we are editing (see screenshot).
Any thought are much appreciated.
Thanks,
Jan
Hi Jan,
For the one you linked, you should be using postid-6851 not page-id-6851.
In developer tool you'll be able to find the exact ID in bodytag.
https://www.screencast.com/t/VkUrNDvn4pl
If you are still not sure, you can link us to all the pages you want to change, I can help you with the IDs.
Let me know :)
Hi Ying,
many thanks for getting back.
Your explanations are extremely helpful and helped me solve the issue.
Best regards to Vancouver (one of the best cities in the world),
Jan
No problems Jan!
Glad it works now :)