Professional Web Applications Themes

Dreamweaver hates my css media type - Macromedia Dynamic HTML

[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...

  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. #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" <webforumsusermacromedia.com> wrote in message
    news:e9lneo$846$1forums.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

  3. #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

  4. #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" <webforumsusermacromedia.com> wrote in message
    news:e9lpu5$ba0$1forums.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

  5. #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

  6. #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 doent p
    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" <webforumsusermacromedia.com> wrote in message
    news:e9m0or$jrt$1forums.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

Similar Threads

  1. Flash Media Server 2 with Dreamweaver
    By Macnimation in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: November 2nd, 03:33 PM
  2. FREEZE!!! My Computer Hates Plugins
    By Kevin Logan in forum Adobe Photoshop Elements
    Replies: 2
    Last Post: July 22nd, 01:40 AM
  3. font type used within the dreamweaver application
    By vectorw2 webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 19th, 02:59 AM
  4. Someone who REALLY hates Amethyst
    By nevermind in forum Windows XP/2000/ME
    Replies: 4
    Last Post: July 15th, 06:05 AM
  5. "Unable to find the plugin that handles this media type" - Shockwave
    By tennek webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 11th, 09:17 PM

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
  •  

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