No link to external css

J

John

Hi there,

I'm feeling a bit puzzled. I have a master and content page that use an
external css file (Home.css) and everything works perfectly. What I don't
understand is that I forgot to add a link to Home.css but some how it's
still being used. My understanding was that only if you explicitly add a
link to a css file would it be used?

If anyone can shed some light I'd be very grateful.

Best regards

John

(Using VS2008 Pro)
 
P

Patrice

Where is this stylesheet ? For example the link is added automatically if
the stylesheet is placed in the theme folder...
 
J

John

Hello Patrice,

Sorry I should have explained. Both content and master pages are at root
level and then I have all of css files (including Home.css) under a folder
named 'css'.

'global.css' and 'MainMaster.css' are linked to within the master head
section (as per below). No mention of 'Home.css' anywhere, but I know it's
working as I can see the effects of changing it plus in Dev Toolbars (IE and
Mozilla).
<link rel="stylesheet" media="all" type="text/css" href="css/global.css" />

<link rel="stylesheet" media="all" type="text/css" href="css/MainMaster.css"
/>

Any thoughts?

Thanks

John
 
W

Walter Wang [MSFT]

Hi John,

Search in all your stylesheet files to see if 'home.css' is imported by
other stylesheet files with "@import url(home.css)", then look at those
stylesheet files to see if they are used by your global.css or
MainMaster.css.

As Patrice pointed out, if you're using themes, stylesheets used in theme
will be included automatically. Check the html source to see if there's any.

Also, you can use IE Developer Toolbar's function "View Element Source with
Style" on the elements that you suspect is using styles from home.css to
confirm if home.css will be listed in the result.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

John

Hello Walter,

Following your advice I've uncovered my mistake. I managed to add a link in
the content page's Page Load event and then promptly forgot about it.

Mystery solved! Thanks very much for your help.

Best regards

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top