2013-09-29 29 views
1

我试图覆盖新的谷歌地图内联样式,以便将自己的CSS应用到自己的应用中。 我无法使用Jquery,因为它会与Mootools冲突(我使用Joomla)。用css覆盖谷歌地图内联样式

问题是,左上角的“infowindow”覆盖了地图的大部分(加上点泡泡),我想限制它有点像280px给定宽度太多。使用Firebug我觉得这

<div id="featureListPanel" class="b0t70b-haAclf" style="display: block; z-index: 0; position: absolute; left: 0px; top: 144px; width: 280px;" 

,但我的风格不能ovveride它:

div#featureListPanel [style] {width: 271px !important;} 

我该如何解决这个问题?

PS。我甚至试过这个:

body div[class*="b0t70b-haAclf"] {width: 271px !important;} 

没有运气..谷歌地图Api是否阻止我用CSS来触摸它或什么?

编辑:有一张图片可以帮助你理解我的意思。被红色包围的是infowindow提到的。 Annoing Google Infowindow

+0

这是一个嵌入式(在iframe中)通过mapsengine创建的地图? –

+0

真的很好的问题:) – KunJ

+0

@ Dr.Molle对不起,我没有收到通知你回复我!是的,它嵌入在从gmaps复制的iframe中。我用图像编辑帖子,以帮助读者理解我的意思。 –

回答

0

div#featureListPanel [style] {width: 271px !important;} [风格]不是CSS的有效途径

所以,简单地使用:

div#featureListPanel {width: 271px !important;} 

如果连不起作用试试这个

body div#featureListPanel [style] {width: 271px !important;} 
+0

那么,[样式]是一个属性选择器。为什么它是无效的? –