Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CSS Problem with XML

 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I have a global css which has this entry in it:


This references the individual file APAHome.xsl

When I reference the above code in the Styles.css file it tiles the background image, almost like it is not reading the statements above it.

It doesn't tile the image on the subsequent pages, it is almost like it is reading the first line and the last line and ignoring the center statements.

Do you have any suggestions?

Thanks,
 
Greg Charles
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think it references APAHome.xsl. The way I read this rule as applying to a body tag with the ID "APAHome" and the class "xsl". It seems likely that it's just not being applied to the page you think it should be. With Firebug, and probably other tools for other browsers, you can examine the body tag in question and see what CSS rules apply to it and where they are coming from.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I have looked at this with Firebug and it says that for some reason it is not reading the 'no-repeat' in the html

the 'no-repeat' from the CSS

Also under the CSS tab in firefox, it says this:

body#APAHome.xsl {
background-image: url("/images/bg_page/APAHome.jpg");
background-position: center center;
background-repeat: no-repeat;
}

This is an application that I inherited and any thoughts you have would be most welcome,

thanks,
 
Greg Charles
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show the body tag you are expecting this rule to apply to? The "background-repeat: no-repeat;" looks OK to me, so I still suspect the whole rule isn't getting applied to your body element, and it's picking up the other properties from a different source.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there is only one Styles.css stylesheet at the root level. So there could not be any conflicting tags.

The only thing that I wonder about is there is a BasePage.java file which says this about the background:



Could you please consider this new information and let me know your thoughts?

Thanks,

 
Greg Charles
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I'd say that body tag wouldn't get the rule applied to it. However, I'd prefer to see the rendered HTML to the Java code. Can you go into Firebug (or just view source) and cut out the body tag you find there and paste it in here?

Also, if you're in Firebug, you can select the body tag and see what rules apply to it. To the right of the each rule, it will tell you where that rule is coming from.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You think that CSS rule means: on a page with the filename of APAHome.xsl, apply thefollowing to the body tag. It has NOTHING to do with a file name, css has no knowledge of file names.

As Greg has already mentioned, the rule is saying




It is looking for this



So unless you have markup like that in your page, that CSS rule is not going to do a thing.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic