You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Session A Mwamufiya <sm...@andrew.cmu.edu> on 2007/09/22 00:36:15 UTC

setting the background with the s:head template

Hi,

I'm trying to control all of my css styles through the s:head tag, so that I change things in only one place.  I copied the template folder to my project's webcontent folder, and edited the styles.css file in template/xhtml/ with the following:
.body {background-color: #00FF00;}

however, this doesn't have any effect on the jsp file in which <s:head /> is included in the <head> tag.

By looking at the source code, I saw that s:head referenced the styles.css page that I edited, but no effect was visible.

Any ideas what I should modify to change the background?

Thanks,
Session


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Re: setting the background with the s:head template

Posted by Session A Mwamufiya <sm...@andrew.cmu.edu>.
I tried it without the "." as well, just: body {background-color: #00FF00; }
but nothing changes.

I circumvented this issue by simply adding a <style> tag in the head.ftl, and not try to alter the styles.css file.

Thanks.


> --- Session A Mwamufiya wrote:
>> .body {background-color: #00FF00;}
> 
> That's defining a class called "body"; does your <body...> tag have a
> "class='body'" attribute?
> 
> If you want to define a style for an HTML element you shouldn't (AFAIK,
> anyway; I guess I've never tried it) preface the element name with a "."
> (or "#", which defines the style for an id).
> 
> d.
> 
> 
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional
> commands, e-mail: user-help@struts.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[OT] Re: setting the background with the s:head template

Posted by Dave Newton <ne...@yahoo.com>.
--- Session A Mwamufiya wrote:
> .body {background-color: #00FF00;}

That's defining a class called "body"; does your
<body...> tag have a "class='body'" attribute?

If you want to define a style for an HTML element you
shouldn't (AFAIK, anyway; I guess I've never tried it)
preface the element name with a "." (or "#", which
defines the style for an id).

d.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org