Jump to content

Unable to make an XML inline style override an external style sheet


cssman

Recommended Posts

I am unable to make an XML inline style override an external style sheet. I am using a valid xml v1.0 document, with a valid and widely used xsl style sheet. The document displays correctly in a web browser (apart from not displaying inline styles), using either IE8 or Firefox. I want to be able to set the font colour of certain parts of the document (any field, including headings) to red, rather than the default colour. Those parts are then made more visible for comment and correction when the pre-publication document is posted on an intranet. As a test, I have used the inline style example: <p style="color:sienna;margin-left:20px">This is a paragraph.</p> given at: http://www.w3schools...s/css_howto.asp This example has no effect. The external style sheet style is still applied.However, the w3schools reference text given below this example states that: "Generally speaking we can say that all the styles will "cascade" into a new "virtual" style sheet by the following rules, where number four has the highest priority:

  1. Browser default
  2. External style sheet
  3. Internal style sheet (in the head section)
  4. Inline style (inside an HTML element)"

I would be very grateful for any advice about to make the inline style work. Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...