graphxks VIP
Total posts: 68
24 Июнь 2014 19:10

The Google Map "map_canvas" div is giving itself a 15px top and bottom margin. (see attachement) I need the top margin to be 0.

Been through tons of Cobalt files and cannot find where this is set. Any help would be greatly appreciated!

Screen Shot 2014-06-24 at 3.02.55 PM

Последние изменения: 27 Июнь 2014


Sergey
Total posts: 13,748
25 Июнь 2014 02:09

Can you try override those values in your custom joomla template CSS file with !important flag?


graphxks VIP
Total posts: 68
25 Июнь 2014 12:37

No, the element style overrides it.

Screen Shot 2014-06-25 at 8.31.40 AM


graphxks VIP
Total posts: 68
25 Июнь 2014 15:10

FOUND IT! Thanks to Insider for Mac!

See attached:

Screen Shot 2014-06-25 at 11.04.12 AM


Sergey
Total posts: 13,748
25 Июнь 2014 23:12

If you delete it there, it will come back with next update.

Try CSS. I think if you add !important to your statements element styles will not override.


graphxks VIP
Total posts: 68
25 Июнь 2014 23:42

Sergey, even with the !important in the statement the element style overrode it.


Sergey
Total posts: 13,748
25 Июнь 2014 23:52

In new version I moved those parameters to <style> instead of inline. Let's see if it will work.

By the way can you show what you put in your CSS file?


graphxks VIP
Total posts: 68
26 Июнь 2014 14:39

Sure, since the div has an id and not a defined class I used:

#map_canvas {
        margin-top:0; !important
}

pepperstreet VIP
Total posts: 3,837
26 Июнь 2014 20:19

graphxks Sure, since the div has an id and not a defined class I used:

#map_canvas {
        margin-top:0; !important
}

Check your syntax. You should put !important before ; ?!

BTW, here is a nice additional trick for persistant styles.

In general, !important should be avoided at all costs. Choose it as a last resort.

@Sergey
Please, avoid inline styles as much as possible. No matter if they are in extra style tags ;-)


Sergey
Total posts: 13,748
26 Июнь 2014 22:52

pepperstreet Please, avoid inline styles as much as possible. No matter if they are in extra style tags ;-)

Roger that!


graphxks VIP
Total posts: 68
27 Июнь 2014 02:39

Thanks Sergey AND pepperstreet.

Replay Topic
Uploading
Click here to upload and insert file from you hard drive: (png, gif, jpg, jpeg, zip, txt, rar)
Работает на Cobalt