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

  • Home
  • SEARCH
  • 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 8934587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:49:32+00:00 2026-06-15T09:49:32+00:00

Today I started to implement Google maps into my site, but I’ve ran into

  • 0

Today I started to implement Google maps into my site, but I’ve ran into a problem, because the div with the maps provided for me can’t be put into another div?!

I use the code stated on this site and when I do something like

<div><div id="map_canvas" style="width:100%; height:100%"></div></div>

it stops working. Why? I don’t want my maps to be displayed over the whole page, I want it to be displayed in an normal div which I can restyle whenever I want…

  • 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-15T09:49:35+00:00Added an answer on June 15, 2026 at 9:49 am

    You can style the div map_canvas. It doesn’t need putting inside another div to do that.

    So for example, change your code to this:

         <div id="map_canvas"></div>
    

    And CSS:

    #map_canvas{
        width:400px; /* your own height here */
        height:300px;  /* your own height here */
         border:solid 1px green;  /* your own border if you like */
    
        /* maybe you want to position it somewhere? you can do for example */
       position:absolute; top:50px; left:50px; 
    
     }
    

    UPDATE

    Apparently you need to set the width & height on the parent DIVS too. I haven’t tested this yet, though try the following:

    <div id="mapHolder"><div id="map_canvas" style="width:100%; height:100%"></div></div>
    
    
    #mapHolder {width:100%; height:100%;}
    

    Failing that, have you tried an absolute size, rather than % as in my CSS at the top of this answer?

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

Sidebar

Related Questions

Today i started working in registration form in magento site. As you know by
I am very new (started today) to writing chrome extensions but need to write
Just today I've started using Drupal for a site I'm designing/developing. For my own
Today I started using the spreadsheet gem to make my excel files, but one
today I started creating and using 9-Pacth images. But my Device does not recognize
Today I started to discover the HTML Code of Google+ When I inspected the
Today I started using the JexcelApi and I bumped into this: When you try
I just started today looking into Groovy. I consider using it to replace some
The problem I have just started today, without really changing the code at all.
I started exploring Google Guice today to do dependency injection in my application. I

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.