Reputation:
Can I use my own css and override all the default jquery css? Also is there any link between the jquery css and the jquery ui?
Upvotes: 2
Views: 1162
Reputation: 33865
First, to clarify, there is no CSS associated with the jQuery library.
For jQuery UI however there are themes, which has CSS-files associated. Those files can easily be overwritten by your own CSS-files, if you desire to do so. Just make sure that your CSS-rules have higher specificity than the rules provided by the theme CSS.
You can also get rid of the theme CSS-files altogether and run nothing but your own CSS-files, as the CSS-files do not affect the functionality of jQuery UI. For simplicity I would however choose a theme that is as close to what you want to achieve as possible, and then override the parts of that theme that is necessary to make it look the way you want. That way you don't have to write the entire theme your self, but can make use of the work of others.
Upvotes: 7
Reputation: 20364
It's all just HTML and CSS at the end of the day.
The jQuery UI javascript just creates the HTML elements and will add all the class names to the elements. If you don't reference a jQuery UI css file then there will be very default styles ( e.g. inline widths/heights/fonts etc...) applied to the UI.
So you can create your own CSS file to change the UI, or roll your own theme as others have suggested.
Upvotes: 0
Reputation: 3955
jQuery UI contain the style information of different parts of the UI section
Like jQuery Dialogue
,jQuery Date Picker
etc
If you dont use the CSS then there is not effect in the functionality
But remember its not a good idea to exclude the css file
The best opition is include the css file and then modify it according to your need.
Upvotes: 0
Reputation: 76870
Well, if you want the look of jQuery UI you need to use that CSS file, but there are no Functional" needs for the CSS files, in fact jsfiddle.net when loads jQuery ui doesn't load the CSS file
Upvotes: 1
Reputation: 227200
You don't need the jQuery UI CSS file, it just makes the UI elements look like UI elements; they'd look odd without it. You can make your own CSS if you want. The jQuery UI Theme Roller can help with this.
Upvotes: 0