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: 29 Mar 2021


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!


kofubypure
Total posts: 1
16 Feb 2021 06:11

Windows styling are the descriptive way of forming the Microsoft good terms in the registered story of bonding. The cobalt 8 story is supporting the situation in easy essay in which the style matters a lot for many of us and society mission campaigns with relevance.


John12
Total posts: 2
29 Mar 2021 18:52

I like your article instant assignment help review thanks for share with me..

Replay Topic
Uploading
Click here to upload and insert file from you hard drive: (png, gif, jpg, jpeg, zip, txt, rar)
Powered by Cobalt