2

I have a input tag with this class that get it from kendostyle

<input class="k-textbox k-input" >

and the k-input class is:

.k-input{
    height: 2.214em;
    line-height: 2.214em;
    padding: .177em 0;
    text-indent: .8em;
    border: 0;
    margin: 0;
}

Now, I don't want the style

height: 2.214em;

In this class , how can I do this?

I can't edit this class is css file because it is used in some other tags

3
  • override it with your custom css. Commented Jan 2, 2017 at 5:21
  • That isn't how CSS works. You should add a more specific selector that applies the more specific style. Commented Jan 2, 2017 at 5:22
  • $('.k-textbox.k-input').css('height', ''); Commented Jan 2, 2017 at 5:23

6 Answers 6

2

add this way other css

.k-textbox.k-input{height:auto;}
Sign up to request clarification or add additional context in comments.

Comments

1

If you don't want style for particular line, you can use inline css to

override the css

<input class="k-textbox k-input"  style="height: auto;">

Comments

1

add parent div then style like

<div class="parent">
  <input class="k-textbox k-input" >
</div>

.parent > .k-input{
  height: auto;
}

Comments

1

Changing the property to an empty string appears to do the job.

$(".k-input").css("height", "");

Comments

1

Add once static div and wrap text box in div.

Try this..

<div class="cstm-input">
<input class="k-textbox k-input" />
</div>


div.cstm-input .k-input{
    height: auto !important;
}

You can do this by jQuery also..

I hope it's help for you...

Comments

1

@user2830448 Please check following code as per your requirement. You can change height in first input as much you require:

.k-input{
    height: 2.214em;
    line-height: 2.214em;
    padding: .177em 0;
    text-indent: .8em;
    border: 0;
    margin: 0;
}

.custom_parent .k-input{
    height:auto !Important;
}
<div class="custom_parent">
    <input  type="text" class="k-textbox k-input" >
</div>  

<input class="k-textbox k-input" >

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.