No link to external css

Discussion in 'ASP .Net' started by John, Jan 18, 2008.

  1. John

    John Guest

    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


    (Using VS2008 Pro)
    John, Jan 18, 2008
    1. Advertisements

  2. John

    Patrice Guest

    Where is this stylesheet ? For example the link is added automatically if
    the stylesheet is placed in the theme folder...
    Patrice, Jan 18, 2008
    1. Advertisements

  3. John

    John Guest

    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
    <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?


    John, Jan 18, 2008
  4. 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

    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.

    Walter Wang (, 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.
    Walter Wang [MSFT], Jan 21, 2008
  5. John

    John Guest

    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, Jan 21, 2008
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.