Header height size smaller for some pages

Multipurpose WordPress Theme Forum Support
GK User
Sun Aug 23, 2015 4:04 pm
Hi,

is it possible at all to make some of the page headers (when there is no picture) smaller in height?
If so how do I need to do so in the CSS file to make sure it only affects specific pages?

Thanks for your help!
User avatar
Senior Boarder

GK User
Mon Aug 24, 2015 9:18 am
Hi,

You have to use css rules with page ids, could you send me some URLs with the pages where you want to display smaller header? THen I'll send you example.
User avatar
Moderator

GK User
Mon Aug 31, 2015 9:39 am
Add the following code into the theme’s css/override.css file
Code: Select all
 .page-id-27 .entry-header {
     height: 350px;
 }


you can use .page-id-X css rule where the X is your page id (visible for example in the URL)
User avatar
Moderator

GK User
Mon Aug 31, 2015 12:39 pm
Perfect that works well. How would I do the same with category pages?
User avatar
Senior Boarder

GK User
Wed Sep 02, 2015 2:56 pm
Try this code:

Code: Select all
.category .entry-header {
     height: 350px;
 }
User avatar
Moderator

GK User
Mon Sep 21, 2015 11:26 pm
Perfect. How can I address the contact page though, it does not seem to have an ID?
User avatar
Senior Boarder

GK User
Tue Sep 22, 2015 10:40 am
Hi, contact page should have an id like page-id-203, it's a template page.

You can inspect it using i.e. Google Dev Tools or Firebug, or source code of your contact page, the body tag should looks like:
Code: Select all
<body class="page page-id-203 page-template page-template-template-contact page-template-template-contact-php dark-bg js-parallax" data


so you can get the page id from the body classes.
User avatar
Moderator


cron