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?
-
1you can use the online site to customize the jquery ui theme, that will be much easier than to rebuilt it from scratch jqueryui.com/themerollermax4ever– max4ever2012-03-12 15:58:04 +00:00Commented Mar 12, 2012 at 15:58
-
Without CSS jsfiddle.net/Ajinkya_Parakh/R7Ghk/1/embedded/result With juery CSS jsfiddle.net/Ajinkya_Parakh/R7Ghk/2/embedded/result. I think its look good with juery CSS and anyway you can overwrite all CSS (I dont know why you will do it)Ajinkya– Ajinkya2012-03-12 16:05:56 +00:00Commented Mar 12, 2012 at 16:05
-
@max4ever I tried using themeroller but found that it's more kinda generic i.e i wasnt able to change the border of modal dialog box alone whereas the css i've made includes all that. And i found the default jquery naming conventions a bit confusing. It might be coz they have simplified it too much to bring the size down.user1264438– user12644382012-03-12 18:05:52 +00:00Commented Mar 12, 2012 at 18:05
5 Answers
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.
Comments
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
4 Comments
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.
Comments
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.
Comments
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.