SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot hpnadig's Avatar
    Join Date
    Sep 2003
    Location
    Bangalore
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question @import url("mycss.css"); - what does this do?

    Code:
    <style type="text/css"><!--
    @import url("mycss.css");
    --></style>
    what does this do?
    Last edited by hpnadig; Nov 25, 2003 at 21:33. Reason: put the code in a code box :)
    Home Page| Blog | Gallery
    sys op & contributor @ kn wikipedia

    Still stuck with a stinky browser? Go get FireFox

  2. #2
    SitePoint Enthusiast Telemakhos's Avatar
    Join Date
    Nov 2003
    Location
    wherever
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It imports the CSS file called "mycss.css" to that page.

    The idea is that you can refernce CSS pages inside CSS pages.

    Check the source and CSS file of www.stopdesign.com to see what I mean.

  3. #3
    SitePoint Zealot hpnadig's Avatar
    Join Date
    Sep 2003
    Location
    Bangalore
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that was a nice link!

    But I don't get what the difference is between <link..... > and @import...
    Home Page| Blog | Gallery
    sys op & contributor @ kn wikipedia

    Still stuck with a stinky browser? Go get FireFox

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    There are a number of threads already that discuss this and you should see a list of "similar threads" at the bottom of the page.

    Here's One:

    http://www.sitepointforums.com/showthread.php?t=112588

    Paul

  5. #5
    SitePoint Addict langedav's Avatar
    Join Date
    Apr 2002
    Location
    Rotterdam, The Netherlands
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the bottom line is that some browsers do not support the @import code, for those browser this is a nice way not to import a style they do not support in the first place :-)

  6. #6
    SitePoint Addict
    Join Date
    Oct 2003
    Location
    Mobile
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't been able to get teh url part to work in IE. I use @import "stylesheet.css" instead.

    Besides the above comment about hiding the style sheets from older browsers such as NN4, I've also read that the <link> tag when used with @import can also have to solve a few browser glitches.

  7. #7
    SitePoint Zealot hpnadig's Avatar
    Join Date
    Sep 2003
    Location
    Bangalore
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul O'B
    Hi,

    There are a number of threads already that discuss this and you should see a list of "similar threads" at the bottom of the page.

    Here's One:

    http://www.sitepointforums.com/showthread.php?t=112588

    Paul

    oh, yeah.. I should've searched before posting there's plenty of info already. Thanks!
    Home Page| Blog | Gallery
    sys op & contributor @ kn wikipedia

    Still stuck with a stinky browser? Go get FireFox


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •