...

View Full Version : How can I hide this div?



cm123077
11-17-2012, 08:02 PM
THere is a div tag I am trying to hide. I know how to hide it with CSS - display:none, but it does not have an id or class, and I can not add one as it is generated by a plugin that I am not comfortable with changing. I am sure there has to be a way to do this with css, but I am not sure how, exactly. If you could help me out that would be great.

NOTE: it is wrapped in an <a> tag, but there is an image that is as well, and changing the css to hide <a> tags gets rid of the content I want to hide, and the image I want to be visible. Please advise.

WEBSITE: http://174.120.16.66/~thomasse/meet-the-team/

I am trying to get rid of the <div> with the link to get directions at the bottom of the info box that pops up when you click on the map marker.

Thanks

Excavator
11-17-2012, 08:23 PM
Hello cm123077,
I don't see an image there, just that link for directions.
That's easy to target with some variation of this -
.leaflet-popup-pane div div div div a:link {display: none;}

cm123077
11-17-2012, 08:38 PM
Hello cm123077,
I don't see an image there, just that link for directions.
That's easy to target with some variation of this -
.leaflet-popup-pane div div div div a:link {display: none;}


That worked well. Thank you so much.

Any idea how I can make the height of the info box the same size as the content with css? Most of them work fine, but the one at the bottom of the map (pink marker with an ! on it) is too small for the content, but I don't want to make them all big enough to house this content....there will be a lot of extra space on most of them.

Thanks

Excavator
11-17-2012, 11:38 PM
Any idea how I can make the height of the info box the same size as the content with css?

Instead of specifiying a height, just let the element work on it's own. It will size itself to it's contents if you let it.



.leaflet-popup-content-wrapper {
/*height: 300px !important;*/
width: 450px !important;
}
.leaflet-popup-content-wrapper {
/*height: 300px !important;*/
width: 450px !important;
}
.leaflet-popup-content {
/*height: 400px !important;*/
width: 400px !important;
}




and in your markup you have some inline style that could go away -
<div style="width: 301px; height: 160px;" class="leaflet-popup-content leaflet-popup-scrolled">

cm123077
11-18-2012, 09:57 PM
It all works now. Thank you for the help



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum