Guest
27 Jun 2013 08:30

Hello,

I have a map template with custom template for the info windows,

I have adedd some css style to the info window template, but I noticed that thsi is always overwritten by a .gm-style class

and I cannot understand where that class is located, neither I am able to overwrite it with css specify in my infowindow template

can you help me?

the class I see in firebug is the below one

.gm-style .gm-style-iw div {

font-weight: 300;

font-size: 13px;

}

Last Modified: 31 Jul 2023


stblink VIP
Total posts: 501
27 Jun 2013 09:18

If you're using windows, download windows grep and install it.

After that right click on the template folder (assuming that you have a copy of the website on ur harddrive) and select windows grep and search for ".gm-style-iw", it will tell you where it is.

Anyway you can override css class using !important after the setting.

Open the CSS file and insert:

.gm-style .gm-style-iw div {

font-weight: none !important;

font-size: 18px !important;

}

And you will see the changes.


Guest
08 Jul 2013 10:05

Thank you stblink,

but this solution seems to not be working for me

.gm-style .gm-style-iw div

cass rules are applied to the whole infowindow text, so overriding them changes all the texts size, while I want to change only the title size

I tried several solution to better specify custom the css class which I ahve created to sorround the title,

my div for the tile looks like this

<div class="cb-title-1"> 

<a href="/<?php echo JRoute::_($record->url)?>"><?php echo $record->title;?></a></div>

and I tried this

.cb-title-1 {font-weight:bold;

font-size:150% !important; 

}

this

.gm-style .gm-style-iw div .cb-title-1 {font-weight:bold;

font-size:150% !important; 

}

and this

.gm-style .gm-style-iw .cb-title-1 div {font-weight:bold;

font-size:150% !important; 

}

as well as other combinatrions, but no luck since now...

the whole infowindow template code looks as below

<style type="text/css">

.gm-style .gm-style-iw div .cb-title-1 {font-weight:bold;

    font-size:150% !important; 

}

.cb-infowindow-img{ float: left;

    margin:3px 6px 0px 0px;

    width:130px;

    height:auto;

    overflow:hidden;

}

.cb-infowindow-img img{

    width:130px;

    height:auto;

}

</style>

<div class="cb-title-1"> 

<a href="/<?php echo JRoute::_($record->url)?>"><?php echo $record->title;?></a></div>

<?php /*?>IMAGE<?php */?>

<?php if(isset($record->fields_by_id[18])): ?> <div class="cb-infowindow-img"><?php echo $record->fields_by_id[18]->result; ?></div> <?php endif; ?> 

<?php /*?>Description<?php */?>

<?php if(isset($record->fields_by_id[27])): ?><div><?php echo $record->fields_by_id[27]->result; ?></div><?php endif; ?>

stblink VIP
Total posts: 501
08 Jul 2013 10:32

Try this:

.cb-title-1 a {font-weight:bold;

font-size:150% !important;

}


Guest
08 Jul 2013 11:29

great sblink, this works!

thank you so much :)


stblink VIP
Total posts: 501
08 Jul 2013 11:35

Your welcome!


killersmile
Total posts: 121
26 Aug 2022 12:18

Awesome site i love it keep posting more! Click here


killersmile
Total posts: 121
26 Aug 2022 12:19

Awesome site i love it keep posting more! Click here


eirajeremy
Total posts: 1
31 Jul 2023 08:33

Wow, this is so cool. I think this is one of the best blog posts ever written, my location. The standard of your work is very good. It's a big deal.

Powered by Cobalt