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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:09:02+00:00 2026-06-13T07:09:02+00:00

I am working on creating a WordPress post that will contain a google map.

  • 0

I am working on creating a WordPress post that will contain a google map. There is styling in the Theme on every image in a post setting the width to 540px. This is ruining the controls by squishing them. I need to find a way to change the style for just this post.


I styled the post by creating a stylesheet with JavaScript and set the correct value as important to override the image. This works but it makes it applies the max-width to all images.

<script>
//used to override the default max width style. If this is remove the control image will be squished into the default max-width set in the clf


var sheet = document.createElement('style')
sheet.innerHTML = "img {max-width:1029px !important;}";
document.body.appendChild(sheet);

</script>

I added the style with a custom field.

  • 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-13T07:09:03+00:00Added an answer on June 13, 2026 at 7:09 am

    There are two methods.

    The more proper way would be to use external stylesheets. If you view your post, then check it out in your dev tool of choice, you’ll see that your post content will be wrapped in a div containing the post id as the html id:

    <div id="post-153484" ... ></div>
    

    So you can have a style in your external stylesheet like:

    #post-153484 img {max-width:1029px !important;}
    

    Or the quick and dirty way which will work, but is perhaps not the best way of doing things would be to include styles within the body of the post. When editing the post in wordpress, change the view to html mode.

    Then add some styles there:

    <style>
        img {max-width:1029px !important;}
    </style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on creating a windows service that will send emails to a customer
I am working on creating a web app that will query event logs on
I'm working on creating an HTML form that has an image in the background.
I am working on creating a Windows Phone app that will play a series
The Problem: I am working on a WordPress Symfony bundle and creating entities for
I'm working on creating a map of Day Z (the game) with leaflet JS
I am currently working on a Wordpress site I have created some custom Post
I am working on creating a MVC4 multi-tenant site that uses seperate DBs for
I'm creating a customized WordPress theme based on an existing site. I want to
I used a image gallery engine called prettyPhoto.js in a WordPress site that 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.