Jump to content

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


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...