Dreamweaver hates my css media type

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Dreamweaver hates my css media type

    [Q]<style type="text/css" media="screen">
    @import "/stylesheets/layout.css"; /* Hide from NN4 */
    </style>
    <link href="/stylesheets/print.css" rel="stylesheet" type="text/css"
    media="print" />[/Q]
    Does not display in Dreamweaver (Rending Mode is set to Screen), but works in
    every browser and validates.

    Dreamweaver reacts better to invalid code:
    [Q]<style type="text/css" media="screen,print">
    @import "/stylesheets/layout.css"; /* Hide from NN4 */
    </style>[/Q]

    My only idea is that it sees the invalid media type and assumes a media="all".
    What does Dreamweaver want? I also tried not using the @import method and
    using <link> tags for both screen and print. Anyone have any experience w/
    this?

    Thanks
    Brandon

    BrandonMUS Guest

  2. Similar Questions and Discussions

    1. Flash Media Server 2 with Dreamweaver
      Hi, I have a few problems. Up to now we have gotten away with FLV files being progressively viewed through a webpage, since the traffic was low...
    2. FREEZE!!! My Computer Hates Plugins
      Me again, with the new XP operating system that freezes when using Elements. Thanks to everyone for replying to my last post, and sorry for not...
    3. font type used within the dreamweaver application
      Guys how can you change the font type within the dreamweaver application Its set to a font very hard to read, and it very small
    4. Someone who REALLY hates Amethyst
      She is a stupid fat bitch called Sarah Balfour, who lives in Gerrards Cross, Bucks, UK. She is a quite a joke amongst people that know her. I...
    5. "Unable to find the plugin that handles this media type" - Shockwave
      Can anyone help me with this please? In DreamweaverMX, I insert a shockwave file on the webpage, and when I click on play I get that message. it...
  3. #2

    Default Re: Dreamweaver hates my css media type

    What is invalid?

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "BrandonMUS" <webforumsuser@macromedia.com> wrote in message
    news:e9lneo$846$1@forums.macromedia.com...
    > [Q]<style type="text/css" media="screen">
    > @import "/stylesheets/layout.css"; /* Hide from NN4 */
    > </style>
    > <link href="/stylesheets/print.css" rel="stylesheet" type="text/css"
    > media="print" />[/Q]
    > Does not display in Dreamweaver (Rending Mode is set to Screen), but works
    > in
    > every browser and validates.
    >
    > Dreamweaver reacts better to invalid code:
    > [Q]<style type="text/css" media="screen,print">
    > @import "/stylesheets/layout.css"; /* Hide from NN4 */
    > </style>[/Q]
    >
    > My only idea is that it sees the invalid media type and assumes a
    > media="all".
    > What does Dreamweaver want? I also tried not using the @import method and
    > using <link> tags for both screen and print. Anyone have any experience
    > w/
    > this?
    >
    > Thanks
    > Brandon
    >

    Murray *ACE* Guest

  4. #3

    Default Re: Dreamweaver hates my css media type

    Media types must be seperated by a comma and a space. "screen,print" is
    invalid whereas "screen, print" is valid in CSS. If a browser sees
    "screen,print", I believe it will revert to the default "all". I would like to
    keep my webpages without a stylesheet for handhelds, screenreaders, etc.

    BrandonMUS Guest

  5. #4

    Default Re: Dreamweaver hates my css media type

    Where do you see that media types must be separated by a comma and a space?

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "BrandonMUS" <webforumsuser@macromedia.com> wrote in message
    news:e9lpu5$ba0$1@forums.macromedia.com...
    > Media types must be seperated by a comma and a space. "screen,print" is
    > invalid whereas "screen, print" is valid in CSS. If a browser sees
    > "screen,print", I believe it will revert to the default "all". I would
    > like to
    > keep my webpages without a stylesheet for handhelds, screenreaders, etc.
    >

    Murray *ACE* Guest

  6. #5

    Default Re: Dreamweaver hates my css media type

    While technically the CSS2 Spec doesn't say it exactly, your CSS will not validate if you don't put a space after the commas. The examples in the CSS2 Spec hint at this.
    BrandonMUS Guest

  7. #6

    Default Re: Dreamweaver hates my css media type

    So it does (or doesn't) -

    W3C CSS Validator Results for [url]http://murraytestsite.com/css-test.html[/url]
    To work as intended, your CSS style sheet needs a correct document parse
    tree. This means you should use valid HTML.

    Errors
    URI : [url]http://murraytestsite.com/css-test.html[/url]
    a.. Line: -1
    unrecognized media print,screen

    Interesting that Eric Meyer says this (and only this) -

    @import url(...) <media>;

    where media is "A comma separated list of target media. This portion of the
    rule is optional."

    and he further gives this as an example (of the @media syntax) -

    @media screen,print {
    * { line-height: 1.25; }
    }


    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "BrandonMUS" <webforumsuser@macromedia.com> wrote in message
    news:e9m0or$jrt$1@forums.macromedia.com...
    > While technically the CSS2 Spec doesn't say it exactly, your CSS will not
    > validate if you don't put a space after the commas. The examples in the
    > CSS2 Spec hint at this.

    Murray *ACE* Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139