Dashboards & Visualizations
Highlighted

How do you right align a text label with an input check box (defaults to top of checkbox)?

Path Finder

My label (text description) for my check box is displaying above the checkbox. How do I align the label (text) to the right of my checkbox?

note: i've tried to apply various styling but to no avail

...
  <fieldset submitButton="false" autoRun="true"> 
    </input>
    <input type="checkbox" token="my_checkbox_filter" searchWhenChanged="true">
      <label>Filter Results</label>
      <delimiter> </delimiter>
    </input>
  </fieldset>
...
0 Karma
Highlighted

Re: How do you right align a text label with an input check box (defaults to top of checkbox)?

Legend

@jaj try the following:

<input type="checkbox" token="my_checkbox" searchWhenChanged="true">
  <label></label>
  <delimiter> </delimiter>
  <choice value="filter">Filter Results</choice>
  <change>
    <set token="my_checkbox_filter">$value$</set>
  </change>
</input>



| eval message="Happy Splunking!!!"


View solution in original post

Highlighted

Re: How do you right align a text label with an input check box (defaults to top of checkbox)?

Path Finder

@niketnilay BAM! works great! thank you! ++ any idea how i can increase the width for longer descriptions instead of it wrapping? can i apply styles in your code somehow and make the width 200% or something?

0 Karma
Highlighted

Re: How do you right align a text label with an input check box (defaults to top of checkbox)?

Legend

Which version of splunk are you on?




| eval message="Happy Splunking!!!"


0 Karma
Highlighted

Re: How do you right align a text label with an input check box (defaults to top of checkbox)?

Path Finder

@niketnilay
Splunk Enterprise
Version:
7.1.3
Build:
51d9cac7b837

0 Karma
Highlighted

Re: How do you right align a text label with an input check box (defaults to top of checkbox)?

Legend

@jaj I have tried the following on Splunk 7.2 . So kinldy check and confirm whether the same DOM select works or not

<form>
  <label>Checkbox Width</label>
  <fieldset submitButton="false">
  </fieldset>
  <row>
    <panel>
     <input id="myCheckBox" type="checkbox" token="my_checkbox" searchWhenChanged="true">
       <label></label>
       <delimiter> </delimiter>
       <choice value="filter">Filter A Really Really Looooooonnnnnnggggggg Results</choice>
       <change>
         <set token="my_checkbox_filter">$value$</set>
       </change>
     </input>
      <html depends="$alwaysHide$">
        <style>
          #myCheckBox{
            min-width: 400px !important;
            width: 400px !important;
          }
        </style>

      </html>      
    </panel>
  </row>
</form>



| eval message="Happy Splunking!!!"


0 Karma
Highlighted

Re: How do you right align a text label with an input check box (defaults to top of checkbox)?

Path Finder

@niketnilay so awesome! thank you

0 Karma