Create a web page.
- Dreamweaver User Guide
- Introduction
- Dreamweaver and Creative Cloud
- Dreamweaver workspaces and views
- Set up sites
- About Dreamweaver sites
- Set up a local version of your site
- Connect to a publishing server
- Set up a testing server
- Import and export Dreamweaver site settings
- Bring existing websites from a remote server to your local site root
- Accessibility features in Dreamweaver
- Advanced settings
- Set site preferences for transferring files
- Specify proxy server settings in Dreamweaver
- Synchronize Dreamweaver settings with Creative Cloud
- Using Git in Dreamweaver
- Manage files
- Create and open files
- Manage files and folders
- Getting and putting files to and from your server
- Check in and check out files
- Synchronize files
- Compare files for differences
- Cloak files and folders in your Dreamweaver site
- Enable Design Notes for Dreamweaver sites
- Preventing potential Gatekeeper exploit
- Layout and design
- CSS
- Understand Cascading Style Sheets
- Laying out pages using CSS Designer
- Using CSS preprocessors in Dreamweaver
- How to set CSS Style preferences in Dreamweaver
- Move CSS rules in Dreamweaver
- Convert inline CSS to a CSS rule in Dreamweaver
- Work with div tags
- Apply gradients to background
- Create and edit CSS3 transition effects in Dreamweaver
- Format code
- Page content and assets
- Set page properties
- Set CSS heading properties and CSS link properties
- Work with text
- Find and replace text, tags, and attributes
- DOM panel
- Edit in Live View
- Encoding documents in Dreamweaver
- Select and view elements in the Document window
- Set text properties in the Property inspector
- Spell check a web page
- Using horizontal rules in Dreamweaver
- Add and modify font combinations in Dreamweaver
- Work with assets
- Insert and update dates in Dreamweaver
- Create and manage favorite assets in Dreamweaver
- Insert and edit images in Dreamweaver
- Add media objects
- Adding videos in Dreamweaver
- Insert HTML5 video
- Insert SWF files
- Add audio effects
- Insert HTML5 audio in Dreamweaver
- Work with library items
- Using Arabic and Hebrew text in Dreamweaver
- Linking and navigation
- jQuery widgets and effects
- Coding websites
- About coding in Dreamweaver
- Coding environment in Dreamweaver
- Set coding preferences
- Customize code coloring
- Write and edit code
- Code hinting and code completion
- Collapse and expand code
- Reuse code with snippets
- Lint code
- Optimize code
- Edit code in Design view
- Work with head content for pages
- Insert server-side includes in Dreamweaver
- Using tag libraries in Dreamweaver
- Importing custom tags into Dreamweaver
- Use JavaScript behaviors (general instructions)
- Apply built-in JavaScript behaviors
- About XML and XSLT
- Perform server-side XSL transformations in Dreamweaver
- Performing client-side XSL transformations in Dreamweaver
- Add character entities for XSLT in Dreamweaver
- Format code
- Cross-product workflows
- Installing and using extensions to Dreamweaver
- In-App updates in Dreamweaver
- Insert Microsoft Office documents in Dreamweaver (Windows only)
- Working with Fireworks and Dreamweaver
- Edit content in Dreamweaver sites using Contribute
- Dreamweaver-Business Catalyst integration
- Create personalized email campaigns
- Templates
- About Dreamweaver templates
- Recognizing templates and template-based documents
- Create a Dreamweaver template
- Create editable regions in templates
- Create repeating regions and tables in Dreamweaver
- Use optional regions in templates
- Define editable tag attributes in Dreamweaver
- How to create nested templates in Dreamweaver
- Edit, update, and delete templates
- Export and import xml content in Dreamweaver
- Apply or remove a template from an existing document
- Edit content in Dreamweaver templates
- Syntax rules for template tags in Dreamweaver
- Set highlighting preferences for template regions
- Benefits of using templates in Dreamweaver
- Mobile and multiscreen
- Dynamic sites, pages and web forms
- Understand web applications
- Set up your computer for application development
- Troubleshoot database connections
- Removing connection scripts in Dreamweaver
- Design dynamic pages
- Dynamic content sources overview
- Define sources of dynamic content
- Add dynamic content to pages
- Changing dynamic content in Dreamweaver
- Display database records
- Provide and troubleshoot live data in Dreamweaver
- Add custom server behaviors in Dreamweaver
- Building forms using Dreamweaver
- Use forms to collect information from users
- Create and enable ColdFusion forms in Dreamweaver
- Create web forms
- Enhanced HTML5 support for form elements
- Develop a form using Dreamweaver
- Building applications visually
- Build master and detail pages in Dreamweaver
- Build search and results pages
- Build a record insert page
- Build an update record page in Dreamweaver
- Building record delete pages in Dreamweaver
- Use ASP commands to modify database in Dreamweaver
- Build a registration page
- Build a login page
- Build a page that only authorized users can access
- Securing folders in Coldfusion using Dreamweaver
- Using ColdFusion components in Dreamweaver
- Test, preview, and publish websites
- Troubleshooting
You can use media queries to specify CSS files based on the reported characteristics of a device (responsive design). The browser on a device checks the media query and uses the corresponding CSS file to display the web page.
For example, the following media query specifies the phone.css file for devices that are 300-320 pixels wide.
<link href="css/orig/phone.css" rel="stylesheet" type="text/css" media="all and (min-width: 300px) and (max-width: 320px)">
For an extensive introduction to media queries see Don Booth’s article on the Adobe Developer Center www.adobe.com/go/learn_dw_medquery_don_en.
For more information on media queries from the W3C see www.w3.org/TR/css3-mediaqueries/.
Create a media query
In Dreamweaver, you can create a site-wide media query file, or a document-specific media query.
Site-wide media query file
Specifies display settings for all pages in your site that include the file.
The site-wide media query file acts as the central repository for all media queries in your site. After you create this file, link to it from pages in your site that must use the media queries in the file for their display.
Document-specific media query
The media query is inserted directly into the document, and the page is displayed based on the inserted media query.
-
-
Select Modify > Media Queries.
-
Do one of the following:
To create a site-wide media query file, select Site Wide Media Queries File.
To create a document-specific media query, select This Document.
-
For site-wide media query, do the following:
-
Click Specify.
-
Select Create New File.
-
Specify a name for the file, and click OK.
-
-
It is possible that some devices do not report their actual width. To force devices to report their actual width, ensure that the option Force Devices To Report Actual Width is enabled.
The following code is inserted into your file when you choose this option.
<meta name="viewport" content="width=device-width">
-
Do one of the following:
Click "+" to define the properties for the media query file.
Click Default Presets if you want to begin with standard presets.
-
Select rows in the table, and edit their properties using the options under Properties.
Description
The description of the device for which the CSS file must be used. For example, phone, TV, tablet, and so on.
Min Width and Max width
The CSS file is used for devices whose reported width is within the specified values.
Huomautus:Leave either Min Width or Max Width blank if you do not want to specify an explicit range for a device. For example, it is common to leave Min Width blank if you want to target phones, which are 320px wide, or less.
CSS file
Select Use Existing File, and browse to the CSS file for the device.
If you want to specify a CSS file that you are yet to create, select Create New File. Enter the name of the CSS file. The file is created when you press OK.
-
Click OK.
-
For site-wide media query, a new file is created. Save it.
Site-wide media query: For existing pages, ensure that you include the media query file in all the pages in the <head> tag.
Example of a media query link where mediaquery_adobedotcom.css is the site-wide media query file for the site www.adobe.com:
<link href="mediaquery_adobedotcom.css" rel="stylesheet" type="text/css">
Use an existing media queries file
-
Create a web page, or open an existing page.
-
Select Modify > Media Queries.
-
Select Site-Wide Media Queries File.
-
Click Specify.
-
Select Use Existing File if you have already created a CSS file with the Media Query.
-
Click the browse icon to navigate to, and specify the file. Click OK.
-
Select Site-Wide Media Queries File.
-
To force devices to report their actual width, ensure that the option Force Devices To Report Actual Width is enabled. The following code is inserted into your file when you choose this option.
<meta name="viewport" content="width=device-width">
-
Click OK.
Choose a different site-wide media queries file
Use this procedure to change the site-wide media queries file that you have set in the Media Queries dialog box.
-
Select Site > Manage Sites.
-
In the Manage Sites dialog, select your site.
-
Click Edit. The Site Setup dialog box is displayed.
-
Under Advanced Settings in the left panel, select Local Info.
-
In Site-Wide Media Query File on the right panel, click Browse to select the media query CSS file.
Huomautus:Changing the site-wide media queries file does not affect documents linked to a different or previous site-wide media query file.
-
Click Save.
View web pages based on media query
Dimensions specified in a media query appear in the options for Multiscreen button/window size. When you select a dimension from the menu, the following changes are seen:
The view size changes to reflect the specified dimensions. The document frame size is unaltered.
The CSS file specified in the media query is used to display the page.