FreewayTalk

3 replies to this thread. Most Recent

billy kimmel

5 Feb 2019, 2:06 pm

[Pro] Leaflet

Looking for a little CSS to style a Leaflet Marker. I want to make the pop up larger and be able to add a little more text. The basics.

Anyone.

Billy

waltd

5 Feb 2019, 2:36 pm

If you post a link to a page where the marker is visible, it will be easy for someone to give you the keys that need changing, or for you to discover them with the Safari Web Inspector.

Walter

On Feb 5, 2019, at 9:06 AM, billy kimmel <[email protected]> wrote:

Looking for a little CSS to style a Leaflet Marker. I want to make the pop up larger and be able to add a little more text. The basics.

Anyone.

Billy

Freeway user since 1997

http://www.walterdavisstudio.com

billy kimmel

5 Feb 2019, 2:43 pm

http://smartytest.com/fish/contact.php

Back to Top

waltd

5 Feb 2019, 2:57 pm
  1. Enable the Develop menu in Safari Preferences Advanced pane.
  2. Control-click on the popup in your page.
  3. Observe the following:
    <div class = leaflet-popup-content-wrapper>
      <div class = leaflet-popup-content>
    text <br>
    text <br>
    text <br>
    text
      </div>
</div>

The -wrapper controls the background-color, box-shadow, border-radius, padding, and text-align. The wrapper also has a hard-coded width property, I can’t recall if that’s something set in the Action or not. If it is, you’ll be able to change that there, otherwise it may be difficult to override (you’ll have to add !important to your class-based style).

The -content controls the margin (which sets the inset from the wrapper) and the line-height. Everything else is inherited from the base styles of your page. Changing the font-family, font-weight, and font-size in this class will make a big difference.

Because the text in the popup is unstructured (just break-separated) you won’t be able to do anything nice there like set the first line in a different font style. Any changes you make will be carried throughout the entire run of text.

Walter

On Feb 5, 2019, at 9:43 AM, billy kimmel <[email protected]> wrote:

http://smartytest.com/fish/contact.php

Freeway user since 1997

http://www.walterdavisstudio.com