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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:25:11+00:00 2026-06-17T21:25:11+00:00

I added a ‘map’ class to a Rails image_tag helper like this <%= image_tag

  • 0

I added a ‘map’ class to a Rails image_tag helper like this

<%= image_tag "http://maps.google.com/maps/api/staticmap?size=300x200&sensor=false&zoom=16&markers={{ latitude }}%2C{{ longitude }}", :class => "map" %>

I tried to set styles specific to that image with the map class, so that the image wouldn’t be visible by default:

img {
border: solid 0px black;
}

img .map { visibility: hidden

}

However, the map class image is visible by default

The ‘map’ class is visible in the html.

<img alt="Staticmap?size=300x200&amp;sensor=false&amp;zoom=16&amp;markers=40.6891947%2c-74.0444169" class="map" src="http://maps.google.com/maps/api/staticmap?size=300x200&amp;sensor=false&amp;zoom=16&amp;markers=40.6891947%2C-74.0444169">

When I inspect the element, Chrome console shows that its only the styles from img that are registering, not img .map

Can you see what I might be doing wrong?

  • 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-17T21:25:12+00:00Added an answer on June 17, 2026 at 9:25 pm

    Your CSS should say

    img.map {
        visibility: hidden
    }
    

    With the space it is the CSS element element selector. It selects elements inside elements. You are looking to use the class selector.

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

Sidebar

Related Questions

I added the GestureListener to an image i'm trying to have zoom like this
I added Jquery toggle/show hide in my site (click the plus sign) http://pligg.marsgibson.info if
I added a configuration variable in application.rb such as module Www class Application <
I added this part of the code in my onCreate() method and it crashes
I added a category to UIView to hold some transition helper methods. The methods
I added two private fields to my Java class. Eclipse prompted me to automatically
I added this to my already existing JQuery tab: function createTab(name) { // this
I added two fields to my devise user. I did this by adding them
I added an additional, new DataSet to my report and have been getting this
ADDED: This question is now, I believe, subsumed by this one: Using GNU Screen

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.