1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Possible to put x2 linked stylesheets in same page?

Discussion in 'CSS' started by misohoni, May 24, 2005.

  1. #1
    Something like this:
    <Head>
    <LINK media="screen" href="wf_files/style1.css" type="text/css" rel="stylesheet">
    <LINK media="screen" href="wf_files/style2.css" type="text/css" rel="stylesheet">
    </Head>

    Is this legal css?

    Thanks
    SEMrush
     
    misohoni, May 24, 2005 IP
    SEMrush
  2. Penfold

    Penfold Peon

    Messages:
    7
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It sure is (or rather, legal HTML), otherwise we'd be a little stuck if we wanted to specify stylesheets for different media e.g. a print stylesheet (though there are other ways to do that).
    <link media="screen" href="wf_files/style1.css" type="text/css" rel="stylesheet" />
    <link media="print" href="wf_files/print_style.css" type="text/css" rel="stylesheet" />
    Code (markup):
    :)

    Note that, according to the rule of the cascade, since the second linked stylesheet is loaded after the first, any matching rule in the second stylesheet will take precedence over the matching rule in the first stylesheet.
     
    Penfold, May 26, 2005 IP
    Colleen likes this.
  3. Colleen

    Colleen Illustrious Member

    Messages:
    6,778
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #3
    Welcome to Digital Point, Penfold. Nice first post. Was hoping someone had the correct answer. :)
     
    Colleen, May 26, 2005 IP
  4. SEbasic

    SEbasic Peon

    Messages:
    6,318
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can also apply different style sheets exclusivly to different browsers...

    Here's an example for ie4

    <!--[if gte IE 4]>
    <link rel="stylesheet" href="LOCATION OF CSS" type="text/css" />
    <![endif]-->
     
    SEbasic, May 27, 2005 IP