[Seasar-user:17383] Re: [Teeda-header color]

[E-MAIL ADDRESS DELETED] [E-MAIL ADDRESS DELETED]
2009年 5月 8日 (金) 15:42:12 JST


Hi, thomas.

The following are samples.

[sample.css]
.headerColor1{background-color:red;}
.headerColor2{background-color:blue;}
.headerColor3{background-color:yellow;}
.footerColor{background-color:blue;}

[layout.html]
<head><link rel="stylesheet" type="text/css" href="/css/sample.css" /></head>
<body id="layoutbody">
<te:include id="layoutHeader" te:src="/layout/header.html"/>
<te:include id="layoutFooter" te:src="/layout/footer.html"/>
</body>

[header.html]
<html>
<body>
<span id="headerColor" class="headerColor2">
this is header
</span>
</body>
</html>

[footer.html]
<html>
<body>
<span id="footerColor" class="footerColor">
this is footer
</span>
</body>
</html>

[HeaderPage.java]
public class HeaderPage {
   public String getHeaderColorStyleClass() {
     Random random = new Random();
     int mod = Math.abs(random.nextInt()) % 3;
     switch (mod) {
     case 0:
       return "headerColor1";
     case 1:
       return "headerColor2";
     default:
       return "headerColor3";
     }
   }
}

Was the problem before solved?
http://ml.seasar.org/archives/seasar-user/2009-April/017300.html


thomas さんは書きました:
 > Hai,
 >
 >
 > I am using layout in my teeda project.How to set the background color for
 > header,footer etc....
 >
 > *<style>
 > .layout.header{background-color:red}
 > </style>*
 >
 > whether the above syntex is correct or not?
 >
 > This is not working...Please give the correct way to change the color of
 > header...
 >
 > Thanks in advance.

-- 
米 林   正 明
http://www.abby.co.jp


Seasar-user メーリングリストの案内