Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8211659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:30:08+00:00 2026-06-07T10:30:08+00:00

I have a layout where I would like the main content area to be

  • 0

I have a layout where I would like the main content area to be 100% height of the remaining space. So I am almost there but the bottom is truncated (which effects zoom and centering). There is 41px from the bottom that is being truncated, which is the measurement of the header area: http://jsfiddle.net/GTscW/

The reason why I know if it cut off is because I do not see the Google map copyright info. Here is the not truncated, but truncates the top (I just removed the top: 41px from #content .inner-content): http://jsfiddle.net/GTscW/1/

How do I subtract 41px from the bottom from the first sample to get the content 100% of the remaining area?

EDIT:

I was able to add just this: $(‘#content .inner-content’).height($(this).height() – $(‘#header’).height()), but really no CSS solution though???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T10:30:10+00:00Added an answer on June 7, 2026 at 10:30 am

    One issue is that it’s not easy to mix percentages and pixel measurements, because different screen sizes will behave differently. But it is possible to use API features to get the map to behave the way you want it to, on any size screen.

    Make the map 100% of the screen size, so the header obscures part of the map. Suppress the default map controls so they do not appear partially obscured. Create an empty custom control the same size as the header and position it at the top of the map. When the map controls are added back, the custom control pushes them out of their usual place so they look right on the visible map.

    var posn=google.maps.ControlPosition; // shorten the reference
    
    // Add empty custom control
    var controlDiv = document.createElement('div');
    controlDiv.style.width='100%';
    controlDiv.style.height='41px';
    map.controls[posn.TOP_LEFT].push(controlDiv);
    map.controls[posn.TOP_RIGHT].push(controlDiv);
    
    // Add map controls
    map.setOptions({
        mapTypeControlOptions:{position:posn.RIGHT_TOP},
        mapTypeControl:true,
        panControlOptions:{position:posn.LEFT_TOP},
        panControl:true,
        streetViewControlOptions:{position:posn.LEFT_TOP},
        streetViewControl:true,
        zoomControlOptions:{position:posn.LEFT_TOP},
        zoomControl:true
    })
    

    http://jsfiddle.net/GTscW/4/

    Note 1: Because the map is actually 41px larger than it looks (in your case), the centre-point will be 20px higher than the centre of the viewable map. This may not be worth worrying about. If it is, then dealing with an apparent centre-point is the subject of another question on SO.

    Note 2: This method won’t work to get a fixed footer, because the Google logo and Terms links are always at the bottom of the map and [currently] don’t move to avoid a control.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a reasonably complex layout problem: I would like to have a main
I have this layout, containing a single TextView , but I would like to
I have a quite complicated HTML/CSS layout which I would like to convert to
I would like to have reusable ratings (typical layout with 5 stars). I have
I have a two column layout: http://jsfiddle.net/KqQ42/1/ Now I would like that the left
I have a route like following, ideally I would like it to match: domain.com/layout/1-slug-is-the-name-of-the-page
I have created a simple layout using the HTML div tag. I would like
I would like to achieve this layout : my main activity layout ( main.xml
So, I'm having trouble with a layout. I would like to have the sidebar
I have a layout for the main screen in an app, which I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.