Post's featured image height

Photo, amazing way to showcase your architecture, photography or artistic projects | Support forum.
GK User
Wed Mar 02, 2016 2:48 pm
Hi,
is normal that the .single .entry-header .page .entry-header is fixed (800px) in the theme-customizer.php at line 1858?
because with Chrome I can see an ugly white space between the image and the menu bar with 1920x1080 screen and the browser favorites bar disabled. And it's very large with slower resolution, it seems 640px defined in style.css.
I think it would be better if it was defined as the the preview post height in the customizer.
I hope I expleined well.
Thanks
User avatar
Junior Boarder

Joshua M
Thu Mar 03, 2016 10:19 am
Hi,

Could you provide a screenshot with this ugly white space between the image and the menu bar? Because I can't see it.

The problem is that for resolution bigger than 1920, the height value is taken from customizer, but for lower resolution screens the height is constant value from style.css, right? You can easily override this value, generally we can add it also to customizer but we are trying to decrease amount of options to the necessary minimum.
User avatar
Moderator

GK User
Thu Mar 03, 2016 10:56 am
Hi,
No I think the problem is that for resolution higher than 1900 the height is fixed to 800px but it's not taken from the customizer (you can't change its value in the customizer), you must edit theme-customizer.php at line 1859:
Code: Select all
@media screen and (min-width: 1900px) {
          .portfolio .item-image-block {
             height: <?php echo get_theme_mod('photo_category_image', '800'); ?>px;
          }
          .single .entry-header,
          .page .entry-header {
             height: 800px;              <-------HERE
          }
       }


For resolution less than 1900 is fixed to 640px in the file style.css and of corse I can override it.
My goal would be that that height follow the Customizing ▸ Advanced layout Other category options image heights in the customizer.
Anyway I think I can do it by my own, I'm only giving you a feedback.
Thanks
User avatar
Junior Boarder

Joshua M
Thu Mar 03, 2016 11:12 am
I understand, you're right, I can assign the value from Customizer-> Advanced layout -> Other category options to this height value instead of hardcoded 800px value. Thanks for your feedback, we'll fix it with the next theme update.
User avatar
Moderator

GK User
Thu Mar 03, 2016 12:23 pm
I tried and maybe the better thing is to put different dimension for different devices in the css files for the "featured images heights" because category options heights (in the customizer ) and "featured images heights" are not compatible. If you put the right value for one than you have a wrong value for other. You can try easily.
I'm going to try something like this in my son theme style.css but I didn't test the values yet:
Code: Select all
/*the height of featured image */
@media screen and (min-width: 1900px) {
   .single .entry-header,
   .page .entry-header {
      height: 1080px;
   }
}
@media screen and (max-width: 1900px) {
   .single .entry-header,
   .page .entry-header {
      height: 900px;
   }
}
@media screen and (max-width: 1240px) {
   .single .entry-header,
   .page .entry-header {
      height: 720px;
   }
}
@media screen and (max-width: 840px) {
   .single .entry-header,
   .page .entry-header {
      height: 520px;
   }
}
@media screen and (max-width: 640px) {
   .single .entry-header,
   .page .entry-header {
      height: 460px;
   }
}



Thanks
User avatar
Junior Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.
GavickPro website uses cookies. By continuing to use this website, you are giving consent to cookies being used. More details…×