Omzy Posted June 18, 2010 Share Posted June 18, 2010 I like jQuery, but one thing I don't like is the vast CSS library included with it. There's so many styles that are overriding parent styles and so on. I like to keep my CSS as simple as possible and although splitting up CSS is good practice, I don't particularly like the idea of applying so many different classes to an element or overriding styles more than once. The thing with jQuery is that all the components share a 'base' css file (jquery.ui.theme.css). This file has shared styles such as .ui-widget and .ui-state-default. The problem I'm having is that if I want to style an individual component I inevitably have to modify one of the shared styles, which subsequently affects other components. How can I, for example tell jQuery Tabs to use ONLY css property ID #tabs instead of using the classes "ui-tabs ui-widget ui-widget-content ui-corner-all"? Link to comment https://forums.phpfreaks.com/topic/205197-jquery-ui-individual-component-styling/ Share on other sites More sharing options...
theverychap Posted June 19, 2010 Share Posted June 19, 2010 I would suggest wrapping an element around your component and using CSS !important declarations to override the existing ui styles... Does that help? Link to comment https://forums.phpfreaks.com/topic/205197-jquery-ui-individual-component-styling/#findComment-1074368 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.