How to remove / disable styling of some bootstrap items

I want to know if styling can be disabled on a specific html element.

In my case, this is the input text. I can not resize it. I went through bootstrap css and found that it has an add-on. I tried to use padding: none and 0 0 0 0 plus !important , and that didn't work.

Is it possible to disable the style for this particular element?

+7
css html5 twitter-bootstrap
source share
5 answers

As in Bootstrap 3, you can use the list-unstyled class to do this.

Example:

 <ul class="list-unstyled"> <li>...</li> </ul> 

Hope this solves your problem.

+6
source share

Yes it is possible. You can achieve this as follows:

  • Download your own stylesheet definition after bootstrap.css . For your case, define input[type=text]{padding:0px;} should call after bootstrap's css file (s).
  • If you want to use the built-in css, you can try: <input type="text" style="padding:0px" />

Hope this helps.

+1
source share

Set it in the style of the element in the style attribute if the element takes precedence.

Also, if you want to be sure to add more!

0
source share

in the "header" of your HTML, change the order of the local css file and the boot css, the local css should be after the boot css:

 <head> <!-- bootstrap css is the first here --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <!-- bootstrap css is the last --> <link rel="stylesheet" href="style.css"> </head> 

Now, if you applied! important in your CSS, this should work.

another solution is to use inline CSS <element style="padding:0"></element>

0
source share

Can javascript help you? If so, the built-in javascript function may help. setAttribute :

http://jsfiddle.net/nMJjS/1/

Just replace the id that I made up with the id of the input element you want to change

-one
source share

All Articles