Web Standards
  Home arrow Web Standards arrow Page 10 - Web Standards in Dreamweaver Part 3
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
VeriSign Whitepapers 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB STANDARDS

Web Standards in Dreamweaver Part 3
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2004-09-22

    Table of Contents:
  • Web Standards in Dreamweaver Part 3
  • Adding Page Content
  • Validating the Document
  • Revalidate Your Page in Dreamweaver
  • Set Properties of Table Cells
  • CSS for Layout
  • Create the Navigation
  • The Content Area
  • Browser and Device Issues
  • Media Descriptors
  • Working with Dynamic Data
  • Resources and Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Web Standards in Dreamweaver Part 3 - Media Descriptors


    (Page 10 of 12 )

    Media descriptors allow you to specify how a document is presented on different media: monitor screens, paper, screen readers, Braille readers, or other devices. For example, you can specify that one stylesheet is used if a page is being printed and another is used when it is displayed in the browser window. Amedia descriptor allows a stylesheet designed with speech synthesis rules to be served to screen readers and stylesheets designed with Web TV or PDAs in mind to be served appropriately.

    Whether a browser or device understands the media descriptor varies between devices at present, but there is good support for print (the media descriptor you will currently find most useful). Learning to use this method of serving appropriate presentational rules should become more useful in the future as device support grows.

    The media descriptors as listed in the CSS2 specification are shown in Table 2-2:

    DescriptorMedia
    allAll devices
    auralSpeech synthesizers
    brailleBraille tactile feedback devices
    embossedPaged Braille printers
    handheldHandheld devices (small screen, monochrome, limited bandwidth).
    printDocuments to be printed
    projectionProjection devices
    screenColor computer screens—standard web browsers
    ttyMedia using a fixed-pitch character grid or portable devices with  limited display capabilities. These are typically older mobile devices; most current devices would fall into the handheld category
    tvTelevision

    You can use media descriptors either by specifying a separate stylesheet for each type that you want to use or by using @ Import.

    Specifying a Separate Stylesheet for Each Media Descriptor

    If you already have a stylesheet linked to your page for presenting your document in a browser and you want to add a stylesheet that will only come into play when the document is printed, you can add a second linked stylesheet for print. You will also need to add the media descriptor screen to your existing stylesheet so that the browser knows to use the screen stylesheet in the browser and the print stylesheet when the page is printed.

    <link rel="stylesheet" type="text/css" media="screen" href="screen.css" />
    <link rel="stylesheet" type="text/css" media="print" href="print.css" />

    Using a print stylesheet allows you to, for instance, hide navigation when a document is printed, change the font from a sans-serif typeface (which is more readable on screen) to a serif typeface (which is more readable in print), and remove a background color or images that would cause the printing to take longer.

    Media Descriptors with Imported Stylesheets

    The method just outlined means that you need to create a separate stylesheet for each browser. However, by using @ Import, you can specify certain elements within one stylesheet to apply to different types of media. To use the @ Import method, attach your stylesheet to the page.

    <style type="text/css" media="all">@import "all.css";</style>

    Within the all.css stylesheet, add attributes for each media descriptor by using @ media.

    @media print {

    body { font-size: 10pt; }
    }

    @media screen {

    body { font-size: 12px; }
    }

    @media screen, print {

    body { color: #000000; }
    }

    The declarations just shown give a font size of 10 points when the page is printed and 12 pixels when the page is viewed in a regular browser. Both screen and print will use #000000 (black) as the color of the body text. 

    This chapter is from ASP.NET Web Development with Macromedia Dreamweaver MX 2004, by Costas Hadjisotiriou (Apress, 2004, ISBN: 1590593480). Check it out at your favorite bookstore today.

    Buy this book now.

    More Web Standards Articles
    More By Apress Publishing


     

    WEB STANDARDS ARTICLES

    - Completing a Configuration for Chrome and a ...
    - Getting Connected with Firefox and Chrome
    - Configuring Servers and Databases with Chrome
    - Configuring Firefox for Chrome and a Server
    - Designing the Elements of a Web Page
    - Matching div heights with CSS and JavaScript
    - Forms
    - Get Down With Markup
    - If I Said You Had a Beautiful Body...
    - Web Standards in Dreamweaver Part 3
    - Web Standards in Dreamweaver, Part 2
    - Web Forms
    - Making Lists Using XHTML
    - Web Standards in Dreamweaver, Part 1







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway