CSS stylesheets are not applied consistently
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Usman_Malik
Posted On:   Thursday, March 6, 2008 11:36 AM

My JSF application has a Welcome page, a Main page and a Details page. When you start the application, you start with the Welcome page. This page has a button that takes you to the Main page. The Main page has 2 buttons, one that takes you back to the Welcome page, and one that take you forward to the Details page. The Details page has a button that takes you back to the Main page. All 3 pages are accessing a common CSS stylesheet. When I navigate the pages in the above order (Welcome >> Main >> Details), everything is fine. However, when I go back from Details to Main, the Main page doesn't seem to use the stylesheet at all. Once that ha   More>>

My JSF application has a Welcome page, a Main page and a Details page. When you start the application, you start with the Welcome page. This page has a button that takes you to the Main page. The Main page has 2 buttons, one that takes you back to the Welcome page, and one that take you forward to the Details page. The Details page has a button that takes you back to the Main page.



All 3 pages are accessing a common CSS stylesheet. When I navigate the pages in the above order (Welcome >> Main >> Details), everything is fine. However, when I go back from Details to Main, the Main page doesn't seem to use the stylesheet at all. Once that happens, I can click the Welcome page (from the Main page) and everything is fine on that page. From the Welcome page, I click on Main page, and that page is fine. Its only when I go from Details to Main that my stylesheets are not being applied.



Now some background details that should be mentioned. The Welcome page, the Main page and the stylesheet are all located at the TOP directory level. The Details page is located one level below them, inside a directory. Since my real application is supposed to get much bigger, I NEED to have the structure this way, I cannot put the Details page on the same level as the other pages.



Here is how I am "calling" the stylesheet from inside each of the pages:



Welcome page ...


Main page ...


Details page ...



As I said earlier, all pages display perfectly when going in the "top-to-bottom" order, but in the reverse order, the Main page seems to ignore the stylesheet.



What adds to my confusion is that I also have a logo (picture) and a resource bundle at the top directory level, and I use these items in all 3 pages, and they always show up perfectly fine regardless of the order in which I traverse the pages. The only item having any problems is the stylesheet.

   <<Less
About | Sitemap | Contact