jquerystruts2struts2-jquerystruts2-json-pluginstruts2-jquery-grid

Struts2-Jquery Grid CSS Editing


I have a Struts2-jquery Grid component on my webpage.

It works perfectly, but how can I edit the CSS rules for the Struts2-jQuery-Grid plugin ?

Can I apply my custom CSS rules to this grid view ?


Solution

  • To answer your question: how to create a new jquery theme?

    1. Just like @Andrea mentioned, You should use jQuery ThemeRoller
    2. Define your sj:head like this

      <%@ taglib prefix="s" uri="/struts-tags"%>
      <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
      <html>
        <head>
          <sj:head jqueryui="true" jquerytheme="mytheme" 
                   customBasepath="template/themes"/>
        </head>
        <body>
        </body>
      </html>
      
    3. You should care following style classes.

      • ui-widget-header
      • ui-state-default
      • ui-widget-content

    If you want to adjust single style, you can use either CSS selector or jQuery selector to do this.

    the plugin will do the rest. Just try it out.