Dashboards & Visualizations

Simple xml dashboard hide label from checkbox

tzacha123
Engager

Hello,

Trying to align a checkbox input to the top by removing the label on top. Even if i leave the label tag empty, it takes up space (&nbsp).  

 

tzacha123_3-1643391684249.jpeg

This css does not seem to work. Would appreciate any suggestions.

div[id^="showSummary"] >label {
display:none !important;
}

 

Below is the complete xml source.

<form hideChrome="true" hideSplunkBar="true" hideAppBar="true" hideEdit="false" hideTitle="false" theme="dark">
<label>Checkbox test</label>
<fieldset submitButton="false" autoRun="true"></fieldset>
<row>
<panel id="viewDetail">
<input type="checkbox" id="showSummary" token="show_summary" searchWhenChanged="true">
<label>x</label>
<choice value="summary">Summary</choice>
</input>
</panel>
</row>
<row depends="$alwaysHideCSSStyle$">
<panel>
<html>
<style>
div[id^="showSummary"] >label {
display:none !important;
}
</style>
</html>
</panel>
</row>
</form>

Labels (1)
0 Karma
1 Solution

Software-Simian
Path Finder

Well sure..

please put <label></label>

No value

You wanted to get rid of the space => hence the height

if you insists on putting something in label:

.input label {
height: 0;
font-size: 0;
}

😉

View solution in original post

0 Karma

Software-Simian
Path Finder

Well sure..

please put <label></label>

No value

You wanted to get rid of the space => hence the height

if you insists on putting something in label:

.input label {
height: 0;
font-size: 0;
}

😉

0 Karma

tzacha123
Engager

Oh I see what you mean. Yes, that does work. Thanks. Will mark your solution as accepted.

0 Karma

Software-Simian
Path Finder

Try HTML CSS

 

 <panel depends="$alwaysHideCSS$">
<html>
<style>

.input label {
height: 0;
}

</style>
</html>
</panel>

0 Karma

tzacha123
Engager

Thanks but that didnt help. This is how it looks now.

tzacha123_0-1643732288521.png

 

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...