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 8961323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:51:51+00:00 2026-06-15T15:51:51+00:00

Okay so I have tried to implement Google Maps as a background to my

  • 0

Okay so I have tried to implement Google Maps as a background to my website. But when I try to put text over it using this code:

.content{
z-index:0;
background-color:fffff;
position: absolute; top: 0; left: 0;
width: 900;
height: auto;
margin-right: auto;
margin-left: auto;
}

And that is giving me an error with the map it is displaying it on top of the map, which is what I want but it is not working with with margins for some reason. All my code is here: http://pastebin.com/uz6wwtYZ

Can anyone help me because I want the content in the center of the webpage and the map to act as the background.

Thanks.

  • 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-15T15:51:53+00:00Added an answer on June 15, 2026 at 3:51 pm

    Try adjusting the top and left instead of margin when an item is set to an absolute position:

    .content{
    z-index: 100;
    background-color:fffff;
    position: absolute; top: 100px; left: 100px;
    width: 900;
    height: auto;
    margin-right: auto;
    margin-left: auto;
    }
    

    Hope that helps? Also might want to set a higher z-index value as I have done above.

    If you want it horizontally centered with auto margin values but also absolutely positioned, I don’t think you can do that.

    You can try this instead by giving your content an absolute width and offsetting the left property:

        .content{
    width: 500px;
        z-index: 100;
        background-color:fffff;
        position: absolute; top: 100px; left: 50%;
        height: auto;
        margin: auto;
    margin-left: -250px; /* half the value of the width */
        }
    

    Here’s a link to a JS Fiddle that uses your code: http://jsfiddle.net/4FLKt/1/ Seems to be working fine.

    Mikey.

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

Sidebar

Related Questions

Okay, this thing is driving me insane, I have tried every way, I have
Okay. This is propably very basic and noobie, but I have about 20+ stores
Okay I have tried this from every angle I can think of and I
Okay I always have questioned this, but never really needed it until today. Normally,
Okay, I have read, and tried a lot of things on how to implement
Okay I started to implement this horrible code from Google's android. The OnSharedPreferenceChangeListener is
okay i have been trying to understand this for hours i am learning VB
Okay I have updated my code a little, but I am still not exactly
Okay so i have this code: if (isset($_GET['book'])) { $query= SELECT book_id, title, authors.`author`
Okay. This is my company's customer portal, it's an MVC 2 project. We have

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.