-3

I want the twenty sixteen theme to "fill up" the height even if the page is empty. So.. If the content does not fill it up, it will be minimum full height.

2
  • 2
    Welcome to WPSE. Please start of by visiting How to Ask and reading all the question related stuff in help center Apr 29, 2016 at 6:29
  • 3
    This is off-topic here as it purely relates to css. You can get more detailed answers from other Stack Exchange sites(eg: Stack Overflow) for this these type of problems.
    – bravokeyl
    Apr 29, 2016 at 6:34

1 Answer 1

-2

I don't know why you wanna do that, but..

We can use min-height with vh (view port height) unit for this. Setting height of the page to 100vh means we are saying the page to fill the full view port height.

.site {
   min-height: 100vh;
}

But this doesn't work well with iOS7. So work around is.

/** 
 * iPad with portrait orientation.
 */
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait){
  .site {
    min-height: 1024px;
  }
}

/** 
 * iPad with landscape orientation.
 */
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape){
  .site {
    min-height: 768px;
  }
}

/**
 * iPhone 5
 * You can also target devices with aspect ratio.
 */
@media screen and (device-aspect-ratio: 40/71) {
  .site {
    min-height: 500px;
  }
}

References:

Can i use :

Work around by pburtchaell

6
  • Why down vote ? May i know the reason for the down vote?
    – bravokeyl
    Apr 29, 2016 at 7:09
  • Of course. Bad mouse behavior. Click by mistake. Did not notice that. Corrected now. My bad, sorry. Apr 29, 2016 at 7:13
  • Guys! who ever is down voting , i request you to comment so that i won't repeat if it's anything is wrong from my side.
    – bravokeyl
    Apr 29, 2016 at 7:24
  • @Supremelink , it's not you who down voted, some else did :(
    – bravokeyl
    Apr 29, 2016 at 7:27
  • @bravokeyl I did not downvote but you want to know why people are down voting because this is off-topic and down voting is normal on off-topic questions/answers.
    – Sumit
    Apr 29, 2016 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.