You can solve this using CSS. Read up on CSS rule specificity. Suppose your component has a rule like this:
span.foo { color: red; } If you want to override that with a rule that comes before it, you can use !important like this: span.foo { color: red !important; } But IMHO this is overkill. A more flexible way is to increase the *specificity* of the earlier rule. Generally, this means to add more terms to the rule: html span.foo { color: red; } CSS considers this more specific than span.foo {...} so it gives it higher priority, even if span.foo {...} comes later. jk On Wed, Aug 12, 2009 at 05:22:07PM +0200, Joe Hudson wrote: > Hello, > > I would like to override some of the styles of components I am using in my > page. However, when I include a CSS resource at the head of my WebPage > component, the incude occurs above all of the component includes. Is there > any way I can specify for an include to be below component includes that I am > using inside my WebPage component? > > For example: > Here is example markup for the web page component > <html> > <head> > <link rel="stylesheet" type="text/css" href="styles/style.css" /> > </head> > <body> > Using some component here > </body> > </html> > > The output is something like this: > > <html> > > <head> > > <link rel="stylesheet" type="text/css" > href="styles/style.css<view-source:http://localhost:8080/wicket/styles/style.css>"/> > > <script type="text/javascript" > src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js<view-source:http://localhost:8080/wicket/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js>"></script> > > <script type="text/javascript" > src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js<view-source:http://localhost:8080/wicket/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js>"></script> > > <script type="text/javascript" > src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js<view-source:http://localhost:8080/wicket/resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js>"></script> > > ... > > </head> > > <body> > > ... > > > > The output that I would like to achieve is something like this: > > <html> > > <head> > > <script type="text/javascript" > src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js<view-source:http://localhost:8080/wicket/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js>"></script> > > <script type="text/javascript" > src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js<view-source:http://localhost:8080/wicket/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js>"></script> > > <script type="text/javascript" > src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js<view-source:http://localhost:8080/wicket/resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js>"></script> > > ... > > <link rel="stylesheet" type="text/css" > href="styles/style.css<view-source:http://localhost:8080/wicket/styles/style.css>"/> > > </head> > > <body> > > > > Is there some kind of component or application setting for this? Thanks very > much for the help. > > > > Joe > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org