Reputation: 195
I want to know if it is possible to disable styling on a specific html element.
In my case it is a input text. I cannot resize it. I went through the bootstrap css and found it has padding. I tried to use padding: none
and 0 0 0 0
plus !important
and it did not work.
Is possible to disable the styling for that specific item?
Upvotes: 11
Views: 42281
Reputation: 61
in the 'head' of your HTML change the order of the local css file and bootstrap css, the local css should be the after the bootstrap 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 it should work.
another solution is to apply your css inline <element style="padding:0"></element>
Upvotes: 1
Reputation: 670
As of Bootstrap 3, you'd use the list-unstyled
class to achieve this.
Example:
<ul class="list-unstyled">
<li>...</li>
</ul>
Hope this solves your problem.
Upvotes: 6
Reputation: 1177
Yes it is possible. You can achieve it in following way:
stylesheet
definition after the bootstrap.css
. For your case define input[type=text]{padding:0px;}
must call after the bootstrap's
css file(s).<input type="text" style="padding:0px" />
Hope it helps.
Upvotes: 1
Reputation:
Set it in the style of the element in the style attribrute if an item is there it has priority.
Also if you want to be double sure add !important as well
Upvotes: 0
Reputation: 44
Would Javascript be of any help to you? If so the .setAttribute
native javascript function can help:
Just replace the id that I made up with the id of input element you want to change
Upvotes: -1