Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

Multiple CSS Style Definitions
 

Jacob




quote this post edit post

IP Loged report this post

Old Post  12-23-03 - 01:29 AM  
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.


Post Follow-Up to this message ]
Re: Multiple CSS Style Definitions
 

Andrew Thompson




quote this post edit post

IP Loged report this post

Old Post  12-23-03 - 11:28 AM  
"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.
Have you tried defining the internal styles before the <link>? AFAIU the last styles defined take precedence. HTH -- Andrew Thompson * http://www.PhySci.org/ PhySci software suite * http://www.1point1C.org/ 1.1C - Superluminal! * http://www.AThompson.info/andrew/ personal site


Post Follow-Up to this message ]
Re: Multiple CSS Style Definitions
 

Jacob




quote this post edit post

IP Loged report this post

Old Post  12-23-03 - 04:28 PM  
"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


Post Follow-Up to this message ]
Re: Multiple CSS Style Definitions
 

Jacob




quote this post edit post

IP Loged report this post

Old Post  12-23-03 - 05:29 PM  
"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.


Post Follow-Up to this message ]
Re: Multiple CSS Style Definitions
 

Andrew Thompson




quote this post edit post

IP Loged report this post

Old Post  12-23-03 - 11:29 PM  
"Jacob" <jacob774@hotmail.com> wrote in message
news:f95ff46c.0312230713.997dcd3@posting.google.com...
quote:
> "Andrew Thompson" <andrew64@bigNOSPAMpond.com> wrote in message
news:<MkUFb.62642$aT.58717@news-server.bigpond.net.au>...
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


Post Follow-Up to this message ]
Re: Multiple CSS Style Definitions
 

Andrew Thompson




quote this post edit post

IP Loged report this post

Old Post  12-24-03 - 12:30 AM  
"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/
quote:
> Thank you for your help.
No worries. Glad you sorted it. ;-) -- Andrew Thompson * http://www.PhySci.org/ PhySci software suite * http://www.1point1C.org/ 1.1C - Superluminal! * http://www.AThompson.info/andrew/ personal site


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 11:18 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top