Hello,
I would like to define some internal styles within an HTML page, but
have those style overridden by an external style sheet if it exists at
the location specified by a <link> element.
If the external style sheet does not exist, then I would like the
internal styles that are defined in the HEAD section of the HTML page
to be used by default.
I have not been able to find any information on how to setup this type
of internal and external style definition.
Does anyone know how this can be done?
Regards,
Jacob.
"Jacob" <jacob774@hotmail.com> wrote in message
news:f95ff46c.0312221541.6373dc3f@posting.google.com...
...
quote:
> I would like to define some internal styles within an HTML page, but
> have those style overridden by an external style sheet if it exists at
> the location specified by a <link> element.
"Andrew Thompson" <andrew64@bigNOSPAMpond.com> wrote in message news:<MkUFb.62642$aT.58717@news-se
rver.bigpond.net.au>...
quote:
> "Jacob" <jacob774@hotmail.com> wrote in message
> news:f95ff46c.0312221541.6373dc3f@posting.google.com...
> ...
>
> Have you tried defining the internal styles
> before the <link>?
>
> AFAIU the last styles defined take precedence.
>
> HTH
Hi Andrew,
Yes, I tried putting the <link> both before and after the internal
styles, but when I then viewed the HTML in IE 6.x it was displayed
using the internal styles each time.
(I know it was using the internal styles as I temporarily changed the
color of the text in the internal style so I would know which set of
styles were being applied.)
Any other ideas?
Regards,
Jacob
"Andrew Thompson" <andrew64@bigNOSPAMpond.com> wrote in message news:<MkUFb.62642$aT.58717@news-se
rver.bigpond.net.au>...
quote:
> "Jacob" <jacob774@hotmail.com> wrote in message
> news:f95ff46c.0312221541.6373dc3f@posting.google.com...
> ...
>
> Have you tried defining the internal styles
> before the <link>?
>
> AFAIU the last styles defined take precedence.
>
> HTH
Hi Andrew,
As it turns out I did not have a color explicitly defined in the
external styles, so the temporary color I did have defined in the
internal styles were always taking effect.
After I explicitly defined colors in the external styles, then the
external styles would obviously apply to the HTML page if the <link>
element was placed after the definition of the internal styles.
Thank you for your help.
Regards,
Jacob.
quote:
...[QUOTE]
> Yes, I tried putting the <link> both before and after the internal
> styles, but when I then viewed the HTML in IE 6.x it was displayed
> using the internal styles each time.
>
> (I know it was using the internal styles as I temporarily changed the
> color of the text in the internal style so I would know which set of
> styles were being applied.)
>
> Any other ideas?
Sorry, no. I'll have to cede to those more
experienced w/ overriding styles. I'm still a
learner myself (with a great deal more to
learn, by all indications).
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
"Jacob" <jacob774@hotmail.com> wrote in message
news:f95ff46c.0312230756.31afd971@posting.google.com...
quote:
> "Andrew Thompson" <andrew64@bigNOSPAMpond.com> wrote in message
news:<MkUFb.62642
...
quote:
> As it turns out...
:) I thought about it and realised my
understanding of styles must be very
remiss if I got the precedence wrong,
so I thought to check it myself.
http://www.physci.org/test/override/