Floorplan tooltip styling

Dear All. I have a simple floorplan with temp and humidity for many rooms.
With tooltips set to tooltipPermanent: true so they are visible all the time
I notice that the tooltip is actually half obscuring the icon.
If I inspect the page CSS this can be fixed by modyfing

.leaflet-tooltip-right {
   margin-left: 6px;

to like 20px and that would do the job for me

Now the question would be how do I pass this styling in YAML to fix that?
Some parameters can be passed in the , but those are related to text itself

    margin-left: 100px

But I somehown can’t modify that one related to leaflet-tooltip-right
Is that possible in YAML?

If not maybe I can hard hack the CSS for all the floorplans but here I have a problem finding the CSS on the OH3 server that is serving it


You can try searching the forums for the stylesheet property (which was added back in march or april if I recall). That allows page level css styling for widgets and other UI pages, I don’t know if it applies to the floorplans or not.

1 Like

Thanks, read throu the related posts and it looks that that feature was added in 3.1M3 so if my release is stable branch:

  version: 3.1.0
  buildString: Release Build

Is it already there? or should I switch to the milestone branch ?

I tried the following syntax on the main page:

  label: Archives Floorplan
  sidebar: true
  backgroundColor: white
  noZoomAnimation: false
  noMarkerZoomAnimation: true
  stylesheet: |
    .leaflet-tooltip-right {
      margin-left: 100px;
    .leaflet-tooltip-left {
      margin-left: -100px;

should that overwrite the .leaflet-tooltip-xxx css margin setting?

Milestones are the lead up to stable releases so your 3.1.0 is more recent than 3.1M3 and you should have the stylesheet functionality.

As far as I understand it, it should.

unfortunately in the syntax I providede one post up it does not. My coprehention of the CSS is very basic. I might have messed up something. This is the exact inspect

That I need to fix the margin for.

Hmm…as I said, I don’t know if the stylesheets are supposed to work with the floorplan pages. It looks like leaflet-tooltip-xxxx should be appropriately downstream so I’m not sure what’s going on.

You could also look into using the tooltipstyle parameter. The downside here is you’ll have to define it for every mark you place.

tooltipstyle works nice but it does the styling within the leaflet-tooltip, so margin-left: 100px does move text within the tooltip.

How about just hard hacking the whole leaflet CSS. with larger tooltip margin?
Where is this CSS located on the server so I can modify once for all the tooltips?

Never looked but you can start looking thorugh the repo:

Any solution here?