V
V
Vyacheslav Golovanov2014-07-02 01:08:03
css
Vyacheslav Golovanov, 2014-07-02 01:08:03

How to restore default styles for fieldset and legend in Bootstrap?

I don't like how Bootstrap changes the appearance of the fieldset and legend and I need to restore them to their original defaults. How can this be done other than cutting out all references to fieldset and legend from bootstrap.css?
I understand that you need to include your style file after including bootstrap.css, but how can I cancel the previously assigned styles in it or set the default styles?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Lobanov, 2014-07-02
@iiil

Replace throughout the document by searching "fieldset" with ".fieldset", "legend" with ".legend".
If you need the usual version - just write it as it is, if you need the bootstrap one - add the above classes.

F
FeNUMe, 2014-07-02
@FeNUMe

The "correct" way is just overriding the framework's styles. And it will take much less time than cutting/renaming the rules associated with fieldsets. Of course, you can use autocorrect, and then catch bugs to which this will lead.
There is another option getbootstrap.com/customize - generate your own assembly that does not contain rules for forms. But if the problem is only with the fieldsets and the legend, then this is not the optimal solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question