Dashboards & Visualizations

Adjust width of input element via CSS

D2SI
Communicator

Hello there,

Is there a way to adjust input link element width using CSS?

I mean, I was able to reduce link button width using "div[data-component="splunk-core:/splunkjs/mvc/components/LinkList"]":

screen1.png

But I would like to also adjust the size of the element itself:

screen2.png

The goal is to ease centering depending on browser resolution:

screen3.png

My test dashboard:

<dashboard>
  <label>Input Link Width</label>
  <row>
    <panel>
      <input type="text" token="text_1_tok">
        <label></label>
        <default>Test1</default>
      </input>
      <input id="link_button_1" type="link" token="link_1_tok">
        <label></label>
        <choice value="true">OK</choice>
      </input>
    </panel>
    <panel>
      <input type="text" token="text_2_tok">
        <label></label>
        <default>Test2</default>
      </input>
      <input id="link_button_2" type="link" token="link_2_tok">
        <label></label>
        <choice value="true">OK</choice>
      </input>
    </panel>
  </row>
  <row>
    <panel>
      <html>
        <style>
          #link_button_1 div[data-component="splunk-core:/splunkjs/mvc/components/LinkList"], #link_button_2 div[data-component="splunk-core:/splunkjs/mvc/components/LinkList"]{
            width: 23% !important;
          }
        </style>
      </html>
    </panel>
  </row>
</dashboard>
Labels (2)
0 Karma
1 Solution

niketn
Legend

@D2SI you have too many posts which may lead to confusion and wasted effort. Move on to a new question only after previous one has been resolved. It would help community members assist you better. 

Refer to my answer on the following thread and confirm whether it resolves your issue or not: https://community.splunk.com/t5/Dashboards-Visualizations/Center-a-mix-of-text-and-link-inputs-using...

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@D2SI you have too many posts which may lead to confusion and wasted effort. Move on to a new question only after previous one has been resolved. It would help community members assist you better. 

Refer to my answer on the following thread and confirm whether it resolves your issue or not: https://community.splunk.com/t5/Dashboards-Visualizations/Center-a-mix-of-text-and-link-inputs-using...

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...