How to target the layout of all blog post?

I’m trying to target the layout of all blog post in the taskhive theme, however I cannot seem to find the correct css class to target these pages.

The reason I need this is because in the taskhive theme, the “search bar” and other content is overlapping with the header-hero. However, I’ve removed the header-hero and moved all the content down to be displayed correctly on the pages with this issue. The only pages I cannot seem to target is the single blog posts.

Regards
Seegon

Alternatively… The way the Taskhive theme is designed, is that the search bar and other elements have a negativ margin-top, making it overlap with the header-hero.

The way I have made this clean and somewhat solved this is display:none on the header hero and then target the specific pages, like the listing-category, search-results and so on, and added a margin top of about 13rem;

However, is there a way to target and remove the negativ margin, giving it a clean, linear look with a navbar, header-hero, content or navbar, content.

Regards

Please try targeting any elements within the single post page via this CSS class:

.single-post

You can also use the browser web inspector to highlight specific elements and check their unique CSS classes Chrome DevTools - Chrome Developers

Thanks for the suggestion, however the .single-post controlls the margin above the nav-bar aswell.

I found that .post–main selector works perfectly.

Just a repeat to my latest post: It seems that alot of the content on the HP pages has a negativ margin-top -6.25rem. The way I work around this is like explained above:

page-id-81 { margin-top: 0px; }

.post–main { margin-top: 0px;}

.tax-hp_listing_tags .site-content {padding-top:13rem}

and so on, for every page.

It works, but needs alot of CSS code. Is there an easier way to target the problem? Can I remove that negativ margin from one selector, and affect all pages?

Thank you
Seegon

Yes, if you mean negative margin of the post container please target this class .post--main There may be other elements, e.g. the search form is shifted, you can target it via .hp-form--primary

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.