Hi all,
I test a w3.css
, to enlarge an image in full screen in the Dashboard according to this example: Tryit Editor v3.6
But the text with the <h1> </h1>
dashboard tags change :
This is the "Click on the image to display it in full size " Template node code :
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<img src="data:image/jpg;base64,{{msg.payload}}" alt="MQTT camAlerte Pict."
style="width:100%;cursor:zoom-in" onclick="document.getElementById('modal01').style.display='block'">
{{msg.filename}}
<div id="modal01" class="w3-modal w3-black" onclick="this.style.display='none'">
<span class="w3-button w3-hover-red w3-xlarge w3-display-topright">×</span>
<div class="w3-modal-content w3-animate-zoom">
<img src="data:image/jpg;base64,{{msg.payload}}" style="width:100%">
</div>
</div>
What should I add to my code so that it does not distort the rest of my Dashboard?
(beginner inside )
Brings in following:
h1{font-size:36px}
h2{font-size:30px}
h3{font-size:24px}
h4{font-size:20px}
h5{font-size:18px}
h6{font-size:16px}
.w3-serif{font-family:serif}
.w3-sans-serif{font-family:sans-serif}
.w3-cursive{font-family:cursive}
.w3-monospace{font-family:monospace}
h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin:10px 0}
So when you use <h1>
tag in text node value, the CSS from w3 affects.
If you need to style text in ui_text widget, most reliable will be to put the content inside <span>
tags and give class to that span and then write CSS for that class and you have full freedom to decorate the text as you like.
An example can be found from this thread: Reduced Line Spacing
Thanks @hotNipi nice trick :
But best would be to have full control over those lines so create text lines with spans and give them classes so you can style them with CSS in one place. Makes life way easier.
[{"id":"510773b5.7aed1c","type":"ui_text","z":"c0ddb509.b04f48","group":"93fae10c.09faa","order":6,"width":0,"height":0,"name":"","label":"Label is here","format":"<span class=\"firstline\">text first line</span><br><span class=\"secondline\">text second line</span>","layout":"row-spread","x":480,"y":1540,"wires":[]},{"…
system
Closed
16 June 2021 08:01
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.