0

I have a website, http://raptorshop.com

Currently, I have set the CSS to have a min-height of 700px, however I would like for every page to automatically note the size of the browser, and resize accordingly (so that the footer has about 50-200px depending on browser size, but nothing more). Currently, if you browse to the site on a small monitor, it gives a scroll, which I do not want.

Is there a way to do this in Drupal? I know how to do it for individual pages, but I want every page to do this sort of automatic check/resize.

2
  • What CSS is set to 700px? What is the expected result? Commented Oct 23, 2011 at 2:16
  • P.S. It sounds like you might need to use max-height instead of min-height. Commented Oct 23, 2011 at 2:17

2 Answers 2

1

You can check the window height with jquery pretty easily, then change the css as needed.
An example:

$(document).ready(function(){
  if ($(window).height() < 700) 
  {
    // this window is smaller than 700px 
  }
  else
  {
    // this window is bigger than 700px
  }
});
Sign up to request clarification or add additional context in comments.

Comments

0

You're going to have to edit some template files, such as those for the site's header and footer. In those, it sounds like what you really want to implement is a CSS Sticky Footer.

You can get one of those here: http://www.cssstickyfooter.com/

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.