Operation Manual
Summary of content (732 pages)
Main Content
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum.
Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.
PAGE 162
Sidebar div, float left A. Width 200 pixels B. Top and bottom padding, 15 pixels Lastly, the CSS rule for the main container div tag finishes the layout: #mainContent { margin: 0 0 0 250px; padding: 0 20px 20px 20px; } The #mainContent rule styles the main content div with a left margin of 250 pixels, which means that it places 250 pixels of space between the left side of the container div, and the left side of the main content div.
PAGE 163
Main Content
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum.
PAGE 164
Liquid Column width is specified as a percentage of the site visitor’s browser width. The design adapts if the site visitor makes the browser wider or narrower, but does not change based on the site visitor’s text settings. 5. Select a document type from the DocType pop-up menu. 6. Select a location for the layout’s CSS from the Layout CSS in pop-up menu. Add To Head Adds CSS for the layout to the head of the page you’re creating.
PAGE 165
called myCustomLayout.htm, call your preview image myCustomLayout.png. 4. (Optional) Create a notes file for your custom layout by opening the Adobe Dreamweaver CS5\Configuration\BuiltIn\Layouts\_notes folder, copying and pasting any of the existing notes files in the same folder, and renaming the copy for your custom layout. For example, you could copy the oneColElsCtr.htm.mno file, and rename it myCustomLayout.htm.mno. 5.
PAGE 166
Understanding Cascading Style Sheets About About About About About Cascading Style Sheets CSS rules cascading styles text formatting and CSS Shorthand CSS properties To the top About Cascading Style Sheets Cascading Style Sheets (CSS) is a collection of formatting rules that control the appearance of content in a web page. Using CSS styles to format a page separates content from presentation.
PAGE 167
You can define the following types of styles in Dreamweaver: Class styles let you apply style properties to any element or elements on the page. HTML tag styles redefine the formatting for a particular tag, such as h1. When you create or change a CSS style for the h1 tag, all text formatted with the h1 tag is immediately updated.
PAGE 168
font-family: Arial; font-size: small; } When a user loads the page, the paragraph font and font size settings set by you as the author override the default paragraph text settings of the browser. Users can make selections to customize the browser display in an optimal way for their own use. In Internet Explorer, for example, the user can select View > Text Size > Largest to expand the page font to a more readable size if they think the font is too small.
PAGE 169
values of several properties using a single declaration. For example, the font property lets you set font-style, font-variant, fontweight, font-size, line-height, and font-family properties on a single line. A key issue to note when using shorthand CSS, is that values omitted from a shorthand CSS property are assigned their default value. This may cause pages to be incorrectly displayed when two or more CSS rules are assigned to the same tag. For example, the h1 rule shown below uses longhand CSS syntax.
PAGE 170
CSS3 transition effects You can create, modify, and delete CSS3 transitions using the CSS Transitions panel. To create a CSS3 transition, create a transition class by specifying values for the transition properties of the element. If you select an element before creating a transition class, the transition class is automatically applied to the selected element. You can choose to add the generated CSS code to the current document or specify an external CSS file.
PAGE 171
End Value The end value for the transition effect. For example, if you want the font-size to increase to 40px at the end of the transition effect, specify 40px for the font-size property. Choose Where To Create The Transition To embed the style in the current document, select This Document Only. If you want to create an external style sheet for the CSS3 code, select New Style Sheet File. When you click Create Transition, you are prompted for a location to save the new CSS file.
PAGE 172
Add a property to a CSS rule Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. You can use the CSS Styles panel to add properties to rules. 1. In the CSS Styles panel (Window > CSS), select a rule in the All Rules pane (All mode), or select a property in the Summary for Selection pane (Current mode). 2.
PAGE 173
Apply, remove, or rename CSS class styles Apply a CSS class style Remove a class style from a selection Rename a class style Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. Class styles are the only type of CSS style that can be applied to any text in a document, regardless of which tags control the text. All class styles associated with the current document are displayed in the CSS Styles panel (with a period [.
PAGE 174
Check for cross-browser CSS rendering issues Run a browser compatibility check Select the element affected by a found issue Jump to the next or previous found issue in the code Select browsers for Dreamweaver to check against Exclude an issue from the browser compatibility check Edit the Ignored Issues list Save a browser compatibility check report View a browser compatibility check report in a browser Open the Adobe CSS Advisor website Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CS
PAGE 175
1. Run a browser compatibility check. 2. In the Results panel, Right-click (Windows) or Control-click (Macintosh) the issue that you want to exclude from future checking. 3. Select Ignore Issue from the context menu. To the top Edit the Ignored Issues list 1. In the Results panel (Window > Results), select the Browser Compatibility Check tab. 2. Click the green arrow in the upper-left corner of the Results panel and select Edit Ignored Issues List. 3. In the Exceptions.
PAGE 176
Convert inline CSS to a CSS rule Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. In-line styles are not recommended best practices. To make your CSS cleaner and more organized, you can convert inline styles to CSS rules that reside in the head of the document or in an external style sheet. 1. In Code view (View > Code), select the entire style attribute that contains the inline CSS you want to convert 2.
PAGE 177
Disable/Enable CSS Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. The Disable/Enable CSS Property feature lets you comment out portions of CSS from the CSS Styles panel, without having to make changes directly in the code. When you comment out portions of the CSS, you can see what kinds of effects particular properties and values have on your page.
PAGE 178
Edit a CSS rule Edit a rule in the CSS Styles panel (Current mode) Edit a rule in the CSS Styles panel (All mode) Change the name of a CSS selector Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. You can easily edit both internal and external rules that you have applied to a document. When you edit a CSS style sheet that controls the text in your document, you instantly reformat all of the text controlled by that CSS style sheet.
PAGE 179
Edit a CSS style sheet Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. A CSS style sheet typically includes one or more rules. You can edit an individual rule in a CSS style sheet using the CSS Styles panel, or if you prefer, you can work directly in the CSS style sheet. 1. In the CSS Styles panel (Window > CSS Styles), select All mode. 2. In the All rules pane, double-click the name of the style sheet you want to edit. 3.
PAGE 180
Enhancements to CSS3 support in the CSS styles panel (CS5.5) Apply CSS3 properties using the pop-up panel Specifying multiple value-sets Locate properties in the Category view Ensuring compliance with browsers Preview changes in Live view A pop-up panel has been introduced in the CSS panel for the following properties: text-shadow box-shadow border-radius border-image The options in the pop-up panel ensure that you apply the property correctly even if you are unfamiliar with their W3C syntax.
PAGE 181
Changes made to CSS properties are not displayed in the Design view. Switch to Live view to preview changes. You can also make quick edits to CSS3 properties in the Live view, and the changes are immediately reflected in this view. The following CSS3 properties are supported in Live View: text-shadow border-radius -webkit-box-shadow -webkit-border-image Adobe recommends Have a tutorial you would like to share? Enhanced support for CSS3 in DW CS5.
PAGE 182
Format CSS code Set CSS code formatting preferences Format CSS code in a CSS style sheet manually Format embedded CSS code manually Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. You can set preferences that control the format of your CSS code whenever you create or edit a CSS rule using the Dreamweaver interface.
PAGE 183
Inspect CSS in Live view Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. Inspect mode works together with Live View to help you quickly identify HTML elements and their associated CSS styles. With Inspect mode turned on, you can hover over elements on your page to see the CSS box model attributes for any block-level element. Note: For more information on the CSS box model, see the CSS 2.1 specification.
PAGE 184
Link to an external CSS style sheet Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. When you edit an external CSS style sheet, all documents linked to that CSS style sheet are updated to reflect those edits. You can export the CSS styles found in a document to create a new CSS style sheet, and attach or link to an external style sheet to apply the styles found there.
PAGE 185
Move/export CSS rules Move/export CSS rules to a new style sheet Move/export CSS rules to an existing style sheet Rearrange or move CSS rules by dragging Select multiple rules before moving them Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. The CSS management features in Dreamweaver make it easy for you to move or export CSS rules to different locations.
PAGE 186
Legal Notices | Online Privacy Policy 179
PAGE 187
Set CSS Styles preferences Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. CSS style preferences control how Dreamweaver writes the code that defines CSS styles. CSS styles can be written in a shorthand form that some people find easier to work with. Some older versions of browsers, however, do not correctly interpret the shorthand. 1.
PAGE 188
Set CSS heading properties for an entire page Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article. You can specify fonts, font sizes, and colors for your page headings. By default, Dreamweaver creates CSS rules for your headings and applies them to all headings you use on the page. (The rules are embedded in the head section of the page.
PAGE 189
Set CSS link properties for an entire page Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article. You can specify fonts, font sizes, colors, and other items for your links. By default, Dreamweaver creates CSS rules for your links and applies them to all links you use on the page. (The rules are embedded in the head section of the page.
PAGE 190
The CSS Styles panel The CSS Styles panel in Current mode The CSS Styles panel in All mode CSS Styles panel buttons and views Open the CSS Styles panel Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. The CSS Styles panel lets you track the CSS rules and properties affecting a currently selected page element (Current mode), or all of the rules and properties that are available to the document (All mode).
PAGE 191
font-size: 12px font-family: 'Arial' color: green The Summary for Selection pane arranges properties in increasing order of specificity. In the above example, the tag style defines the font size and the class style defines the font family and the color. (The font family defined by the class style overrides the font family defined by the tag style because class selectors have higher specificity than tag selectors. For more information on CSS specificity, see www.w3.org/TR/CSS2/cascade.html.
PAGE 192
Block, Border, and so on, with set properties at the top of each category. List view displays an alphabetical list of all available properties, and likewise sorts set properties to the top. To switch between views, click the Show Category View, Show List View, or Show Only Set Properties button, located at the lower-left corner of the Properties pane. In all views, set properties are displayed in blue.
PAGE 193
Update CSS style sheets in a Contribute site Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. Adobe Contribute users can’t make changes to a CSS style sheet. To change a style sheet for a Contribute site, use Dreamweaver. 1. Edit the style sheet using the Dreamweaver style-sheet-editing tools. 2.
PAGE 194
Use Design-Time style sheets Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. Design-Time style sheets allow you to show or hide design applied by a CSS style sheet as you work in a Dreamweaver document. For example, you can use this option to include or exclude the effect of a Macintosh-only or a Windows-only style sheet as you design a page.
PAGE 195
Use Dreamweaver sample style sheets Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. Dreamweaver provides sample style sheets that you can apply to your pages or that you can use as starting points to develop your own styles. 1. Open the CSS Styles panel by doing one of the following: Select Window > CSS Styles. Press Shift+F11. 2. In the CSS Styles panel, click the Attach External Style Sheet button.
PAGE 196
Working with div tags Insert and edit div tags CSS layout blocks Working with AP elements Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. (Creative Cloud users only): Seven new semantic tags are available when you select Insert > Layout. The new tags are : Article, Aside, HGroup, Navigation, Section, Header, and Footer. For more information, see Insert HTML5 semantic elements from the Insert panel.
PAGE 197
Click the border of the div tag. Look for the highlighting to see the border. Click inside the div tag, and press Control+A (Windows) or Command+A (Macintosh) twice. Click inside the div tag, then select the div tag from the tag selector at the bottom of the Document window. 2. Select Window > CSS Styles to open the CSS Styles panel if it is not already open. Rules applied to the div tag appear in the panel. 3. Make edits as necessary.
PAGE 198
View CSS layout block outlines Select View > Visual Aids > CSS Layout Outlines. View CSS layout block backgrounds Select View > Visual Aids > CSS Layout Backgrounds. View CSS layout block box models Select View > Visual Aids > CSS Layout Box Model. You can also access CSS layout block visual aid options by clicking the Visual Aids button on the Document toolbar.
PAGE 199
PAGE 200
PAGE 201
3. Set any of the following options: CSS-P Element Specifies an ID for the selected AP element. The ID identifies the AP element in the AP Elements panel and in JavaScript code. Use only standard alphanumeric characters; do not use special characters such as spaces, hyphens, slashes, or periods. Every AP element must have its own unique ID. Note: The CSS-P Property inspector presents the same options for relatively-positioned elements.
PAGE 202
Hold down Shift while selecting AP elements. View and set properties for multiple AP elements 1. Select multiple AP elements. 2. In the Property inspector (Window > Properties), click the expander arrow in the lower-right corner, if it isn’t already expanded, to see all properties. 3.
PAGE 203
Click inside an AP element and press Control+A (Windows) or Command+A (Macintosh) to select the contents of the AP element. Press Control+A or Command+A again to select the AP element. Click inside an AP element and select its tag in the tag selector. Select multiple AP elements Do one of the following: In the AP Elements panel (Window > AP Elements), Shift-click two or more AP element names. In the Document window, Shift-click inside or on the border of two or more AP elements.
PAGE 204
1. In Design view, select an AP element. 2. Do one of the following to resize the AP element: To resize by dragging, drag any of the AP element’s resize handles. To resize one pixel at a time, hold down Control (Windows) or Option (Macintosh) while pressing an arrow key. The arrow keys move the right and bottom borders of the AP element; you can’t resize using the top and left borders with this technique.
PAGE 205
Convert AP elements to a table 1. Select Modify > Convert > AP Divs To Table. 2. Specify any of the following options and click OK: Most Accurate Creates a cell for every AP element, plus any additional cells that are necessary to preserve the space between AP elements. Smallest: Collapse Empty Cells Specifies that the AP elements’ edges should be aligned if they are positioned within the specified number of pixels.
PAGE 206
Layout and design 199
PAGE 207
Laying out pages with CSS About CSS page layout About CSS page layout structure Create a page with a CSS layout To the top About CSS page layout A CSS page layout uses the Cascading Style Sheets format, rather than traditional HTML tables or frames, to organize the content on a web page. The basic building block of the CSS layout is the div tag—an HTML tag that in most cases acts as a container for text, images, and other page elements.
PAGE 208
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis.
Main Content
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum.
Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.
PAGE 209
Sidebar div, float left A. Width 200 pixels B. Top and bottom padding, 15 pixels Lastly, the CSS rule for the main container div tag finishes the layout: #mainContent { margin: 0 0 0 250px; padding: 0 20px 20px 20px; } The #mainContent rule styles the main content div with a left margin of 250 pixels, which means that it places 250 pixels of space between the left side of the container div, and the left side of the main content div.
PAGE 210
Main Content
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum.
PAGE 211
Liquid Column width is specified as a percentage of the site visitor’s browser width. The design adapts if the site visitor makes the browser wider or narrower, but does not change based on the site visitor’s text settings. 5. Select a document type from the DocType pop-up menu. 6. Select a location for the layout’s CSS from the Layout CSS in pop-up menu. Add To Head Adds CSS for the layout to the head of the page you’re creating.
PAGE 212
called myCustomLayout.htm, call your preview image myCustomLayout.png. 4. (Optional) Create a notes file for your custom layout by opening the Adobe Dreamweaver CS5\Configuration\BuiltIn\Layouts\_notes folder, copying and pasting any of the existing notes files in the same folder, and renaming the copy for your custom layout. For example, you could copy the oneColElsCtr.htm.mno file, and rename it myCustomLayout.htm.mno. 5.
PAGE 213
CSS Designer panel (CC, 13.1) In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. Create and attach style sheets Define media queries Define Selectors Set properties Identify page elements associated with a CSS Selector (13.1) CSS Designer (Windows > CSS Designer) is an integrated panel that lets you 'visually' create CSS files, rules, and set properties, along with media queries.
PAGE 214
selectors for that media query. If no CSS or media queries are selected, this pane displays all the selectors in the document. When you select Global in the @Media pane, all the selectors that are not included in a media query of the selected source are displayed. Properties Displays properties that you can set for the specified selector. For more information, see Set properties. CSS Designer is context-sensitive.
PAGE 215
1. In the Sources pane of the CSS Designer panel, click , and then click one of the following options: Create a New CSS File: To create and attach a new CSS file to the document Attach Existing CSS File: To attach an existing CSS file to the document Define in Page: To define a CSS within the document Based on the option you choose, Create A New CSS File or Attach Existing CSS File dialog boxes appear. 2.
PAGE 216
To search for a specific selector, use the search box at the top of the pane. To rename a selector, click the selector, and type the required name. To reorganize the selectors, drag the selectors to the required position. To move a selector from one source to another, drag the selector to the required source in the Source pane. To duplicate a selector in the selected source, right-click the selector, and click Duplicate.
PAGE 217
Only set properties To set a property, such as, width or border-collapse, click the required options displayed adjacent to the property in the Properties pane. For information on setting gradient background or box controls such as margins, padding, and position, see the following links: Set margins, padding, and position Apply gradients to background Use Flexible Box layouts Overridden properties are indicated using a strikethrough format.
PAGE 218
'padding' property 'position' property Click the values and type the required value. If you want all the four values to be the same and changed simultaneously, click the link icon ( the center. )at At any point in time, you can disable ( ) or delete ( ) specific values, for example, left margin value while retaining the right, top, and bottom values. Disable, delete, and link icons for margins Disable or delete properties The CSS Designer panel lets you disable or delete each property.
PAGE 219
To identify the page elements associated with a CSS Selector, hover your mouse over the Selector in Live View (with Live Code 'off'). Dreamweaver highlights the associated elements with dotted lines. To lock-in the highlight for the elements, click the Selector. The elements now are highlighted with a blue border. To remove the blue highlight around the elements, the Selector again. Note: The following table summarizes the scenarios where Live Highlight is not available.
PAGE 220
Fluid grid layouts (CC) Using Fluid Grid layouts Tutorials on Fluid Grid layouts Create a fluid grid layout Insert Fluid Grid elements Nesting elements The layout of a website has to respond and adapt to the dimensions of the device on which it is displayed. Fluid grid layouts provide a visual way to create different layouts corresponding to devices on which the website is displayed. For example, your website is going to be viewed on desktops, tablets, and mobile phones.
PAGE 221
panel to create your layout. To switch to designing the layout for other devices, click the corresponding icon in the options below the Design view. 6. Save the file. When you save the HTML file, you are prompted to save the dependent files such as boilerplate.css and respond.min.js to a location on your computer. Specify a location, and click Copy. The boilerplate.css is based on the HTML5 boilerplate.
PAGE 222
C Move up a row Moves the element up by a row D Duplicate Duplicates the currently selected element. CSS linked to element is also duplicated. E Delete For ID selectors, deletes both the HTML as well as CSS. To delete HTML only, press Delete. For class selectors, only HTML is deleted. F Lock Converts the element to an absolutely positioned element. Align For class selectors, the Align option acts as a zero margin button. For ID selectors, the align button aligns the element to the grid.
PAGE 223
Using jQuery UI widgets in Dreamweaver (CC) Spry widgets are replaced with jQuery widgets in Dreamweaver CC and later. While you can still modify existing spry widgets on your page, you cannot add new spry widgets. Widgets are small web applications written in languages such as DHTML and JavaScript that can be inserted and executed within a web page. Among other things, web widgets help provide a way to replicate desktop experiences on a web page.
PAGE 224
Using jQuery effects in Dreamweaver (CC) Spry effects are replaced with jQuery effects in Dreamweaver CC. While you can still modify existing spry effects on your page, you cannot add new spry effects. Add jQuery effects Event-based jQuery effects Remove jQuery effects To the top Add jQuery effects 1. In the Design or Code view of your Dreamweaver document, select the element to which you want to apply a jQuery effect. 2. Select Windows > Behaviors to open the Behaviors panel. 3.
PAGE 225
Event-based jQuery effects When you apply a jQuery effect, it is assigned to the onClick event by default. You can change the trigger event for the effect using the Behaviors panel. 1. Select the required page element. 2. In the Windows > Behaviors panel, click the Show Set Events icon. 3. Click the row that corresponds to the effect that is currently applied. Note that the first column changes to a drop-down list providing a list of events that you can choose from. 4. Click the required event.
PAGE 226
Colors Web-safe colors Use the color picker Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article. To the top Web-safe colors In HTML, colors are expressed either as hexadecimal values (for example, #FF0000) or as color names (red).
PAGE 227
Creating media queries (CS5.5 and later) Overview Create a media query Use an existing media queries file Choose a different site-wide media queries file Viewing web pages based on media query You can use media queries to specify CSS files based on the reported characteristics of a device. 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.
PAGE 228
6. 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. 7. 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.
PAGE 229
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.
PAGE 230
Designing dynamic pages Dreamweaver and dynamic page design Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article. To the top Dreamweaver and dynamic page design Follow these general steps to successfully design and create a dynamic website. 1. Design the page.
PAGE 231
the data formats. Create record navigation and status controls, master/detail pages, and forms for updating information in a database. Display more than one record from a database record. Create recordset navigation links that allow users to view the previous or next records from a database record. Add a record counter to help users keep track of how many records were returned, and where they are in the returned result.
PAGE 232
Displaying data with Spry About Spry data sets Create a Spry data set Create a Spry region Create a Spry repeat region Create a Spry repeat list region Note: Spry widgets are replaced with jQuery widgets in Dreamweaver CC and later. While you can still modify existing spry widgets on your page, you cannot add new spry widgets. To the top About Spry data sets A Spry data set is fundamentally a JavaScript object that holds a collection of data that you specify.
PAGE 233
Selecting the element for the HTML data set data container. For lengthy files, you can click the Expand/Collapse arrow at the bottom of the Data Selection window to see more of the data. Once you select the container element for the data set, Dreamweaver displays a preview of the data set in the Data Preview window. (Optional) Select Advanced Data Selection if you want to specify CSS data selectors for the data set. For example, if you specified .product in the Row Selectors text box, and .
PAGE 234
6. Click Done. Dreamweaver creates the data set and, if you selected a layout option, displays the layout and data placeholders on your page. If you look in Code view, you’ll see that Dreamweaver has added references in the header to the SpryData.js file and the SpryHTMLDataSet.js file. These files are important Spry assets that work in conjunction with the page. Be sure not to remove this code from your page or the data set will not function.
PAGE 235
(Optional) Specify how you want to sort the data by selecting the column you want to sort by from the Sort Column pop-up menu. Once you’ve selected the column, you can specify whether to sort it in ascending or descending order. (Optional) Select Filter Out Duplicate rows to exclude duplicate rows of data from the data set. (Optional) Select Disable Data Caching if you always want to have access to the most recent data in the data set.
PAGE 236
Master/Detail layout Select this option if you want to display your data using a master/detail layout. Master/detail layouts let users click an item in the master (left) region that updates the information in the detail (right) region. Typically the master region contains a long list of names, for example a list of available products. When the user clicks one of the product names, the detail region displays much more detailed information about the selection.
PAGE 237
Do Not Insert HTML Select this option if you want to create a data set, but do not want Dreamweaver to insert an HTML layout for the data set. The data set becomes available from the Bindings panel (Window > Bindings), and you can manually drag pieces of the data set to the page. Even if you create a data set without inserting a layout, you can still insert one of the available HTML layouts at any time.
PAGE 238
add them automatically when you insert a table or repeat list, or you can wrap them around existing tables or repeat list objects. If you are adding a detail region, typically you add the master table object first and select the Update Detail Regions option (see Dynamic Table layout). The only value that is different and specific for a detail region is the Type option in the Insert Spry Region dialog box. 1. Select Insert > Spry > Spry Region.
PAGE 239
child level. For instance, if you have a
- list, the data is checked at the
- level. If you choose the Repeat option, the data is checked at the
- level. The Repeat Children option may be especially useful if you use conditional expressions in your code. 4. Choose your Spry data set from the menu. 5. If you already have text or elements selected, you can wrap or replace them. 6. Click OK to display a repeat region on your page.
-
PAGE 240
Legal Notices | Online Privacy Policy 233
-
PAGE 241
Displaying database records About database records Server behaviors and formatting elements Applying typographic and page layout elements to dynamic data Navigating database recordset results Create a recordset navigation bar Custom recordset navigation bars Navigation bar design tasks Display and hide regions based on recordset results Display multiple recordset results Create a dynamic table Create record counters Use predefined data formats Note: The user interface has been simplified in Dreamweaver CC a
-
PAGE 242
to display five records at a time, you might want to add links such as Next or Previous that let users display the five next or previous records. You can create four types of navigation links to move through a recordset: First, Previous, Next, and Last. A single page can contain any number of these links, provided they all work on a single recordset. You can’t add links to move through a second recordset on the same page.
-
PAGE 243
Create and assign server behaviors to a navigation link 1. In Design view, select the text string or image on the page you want to use as a record navigation link. 2. Open the Server Behaviors panel (Window > Server Behaviors), and click the Plus (+) button. 3. Select Recordset Paging from the pop-up menu; then select a server behavior appropriate to that link from the listed server behaviors.
-
PAGE 244
To the top Display multiple recordset results The Repeating Region server behavior lets you display multiple records from a recordset within a page. Any dynamic data selection can be turned into a repeating region. However, the most common regions are a table, a table row, or a series of table rows. 1. In Design view, select a region that contains dynamic content. The selection can be anything, including a table, a table row, or even a paragraph of text.
-
PAGE 245
2. Select the recordset from the Recordset pop-up menu. 3. Select the number of records to display per page. 4. (Optional) Input values for the table border, cell padding, and cell spacing. The Dynamic Table dialog box retains the values you enter for table borders, cell padding, and cell spacing. Note: If you are working on a project that requires several dynamic tables with the same appearance, enter the table layout values, which further simplifies page development.
-
PAGE 246
This example creates a record counter that appears similar to the example in “Simple record counters.” In this example, the text in sans-serif font represents the record count placeholders that will be inserted in the page. The record counter in this example appears as follows: Displaying records StartRow through EndRow of RecordSet.RecordCount. 1. In Design view, enter the counter’s text on the page. The text can be anything you want, for example: Displaying records thru of . 2.
-
PAGE 247
The number of digits to display after the decimal point Whether to place a leading zero in front of fractions Whether to use parentheses or a minus sign for negative values Whether to group digits c. To delete a data format, click the format in the list, and click the Minus (-) button. Create a data format (ASP only) 1. Open a page containing dynamic data in Design view. 2. Select the dynamic data you want to create a custom format for. 3.
-
PAGE 248
Presenting content with tables About tables Table formatting precedence in HTML About splitting and merging table cells Insert a table and add content Import and export tabular data Select table elements Set table properties Set cell, row, or column properties Use Expanded Tables mode for easier table editing Format tables and cells Resizing tables, columns, and rows Resize tables, columns, and rows Add and remove rows and columns Split and merge cells Copy, paste, and delete cells Nest tables Sort tables N
-
PAGE 249
several columns or rows. You can split a cell into any number of rows or columns, regardless of whether it was previously merged. Dreamweaver automatically restructures the table (adding any necessary colspan or rowspan attributes) to create the specified arrangement. In the following example, the cells in the middle of the first two rows have been merged into a single cell that spans two rows. To the top Insert a table and add content Use the Insert panel or the Insert menu to create a new table.
-
PAGE 250
Select Insert > Table Objects > Import Tabular Data. 2. Specify the options for the tabular data and click OK. Data File The name of the file to import. Click the Browse button to select a file. Delimiter The delimiter used in the file you’re importing. If you select Other, a text box appears to the right of the pop-up menu. Enter the delimiter used in your file. Note: Specify the delimiter that was used when the data file was saved.
-
PAGE 251
Select a single column 1. Click in the column. 2. Click the column header menu and choose Select Column. Select a single cell Do one of the following: Click in the cell, then select the
tag in the tag selector at the lower-left corner of the Document window. Control-click (Windows) or Command-click (Macintosh) in the cell. Click in the cell and select Edit >Select All. Select Edit > Select All again when a cell is selected to select the entire table. PAGE 252
Table Id An ID for the table. Rows and Cols The number of rows and columns in the table. W The width of the table in pixels, or as a percentage of the browser window’s width. Note: You usually don’t need to set the height of a table. CellPad The number of pixels between a cell’s content and the cell boundaries. CellSpace The number of pixels between adjacent table cells. Align Determines where the table appears, relative to other elements in the same paragraph, such as text or images.
PAGE 253
When you set certain properties for a row, however, Dreamweaver changes the attributes of the tr tag rather than changing the attributes of each td tag in the row. When you’re applying the same format to all the cells in a row, applying the format to the tr tag produces cleaner, more concise HTML code. 3. Press Tab or Enter (Windows) or Return (Macintosh) to apply the value.
PAGE 254
Add or edit accessibility values for a table in Design view To edit the table caption, highlight the caption and type a new caption. To edit the caption alignment, place the insertion point in the table caption, right-click (Windows) or Control-click (Macintosh), then select Edit Tag Code. To edit the table summary, select the table, right-click (Windows) or Control-click (Macintosh), then select Edit Tag Code.
PAGE 255
Change a row’s height visually Drag the lower border of the row. Make column widths in code consistent with visual widths 1. Click in a cell. 2. Click the table header menu, then select Make All Widths Consistent. Dreamweaver resets the width specified in the code to match the visual width. Clear all set widths or heights in a table 1. Select the table. 2. Do one of the following: Select Modify > Table > Clear Cell Widths, or Modify > Table > Clear Cell Heights.
PAGE 256
Add multiple rows or columns 1. Click in a cell. 2. Select Modify > Table > Insert Rows Or Columns, complete the dialog box, and click OK. Insert Indicates whether to insert rows or columns. Number of Rows or Number of Columns The number of rows or columns to insert. Where Specifies whether the new rows or columns should appear before or after the row or column of the selected cell.
PAGE 257
options. The contents of the individual cells are placed in the resulting merged cell. The properties of the first cell selected are applied to the merged cell. Split a cell 1. Click in the cell and do one of the following: Select Modify > Table > Split Cell. In the expanded HTML Property inspector (Window > Properties), click Split Cell . Note: If you don’t see the button, click the expander arrow in the lower-right corner of the Property inspector so that you see all the options. 2.
PAGE 258
To paste a full column of cells to the left of a particular cell, click in that cell. Note: If you have less than a full row or column of cells in the clipboard, and you click in a cell and paste the cells from the clipboard, the cell you clicked in and its neighbors may (depending on its location in the table) be replaced with the cells you are pasting. To create a new table with the pasted cells, place the insertion point outside of the table. 2. Select Edit > Paste.
PAGE 259
[print]Laying out pages with CSS Legal Notices | Online Privacy Policy 252
PAGE 260
Set CSS heading properties for an entire page Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article. You can specify fonts, font sizes, and colors for your page headings. By default, Dreamweaver creates CSS rules for your headings and applies them to all headings you use on the page. (The rules are embedded in the head section of the page.
PAGE 261
Set title and encoding properties for a page Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article. The Title/Encoding Page Properties options let you specify the document encoding type that is specific to the language used to author your web pages as well as specify which Unicode Normalization Form to use with that encoding type. 1.
PAGE 262
Understanding document encoding Document encoding specifies the encoding used for characters in the document. Document encoding is specified in a meta tag in the head of the document; it tells the browser and Dreamweaver how the document should be decoded and what fonts should be used to display the decoded text. For example, if you specify Western European (Latin1), this meta tag is inserted: .
PAGE 263
Update CSS style sheets in a Contribute site Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. Adobe Contribute users can’t make changes to a CSS style sheet. To change a style sheet for a Contribute site, use Dreamweaver. 1. Edit the style sheet using the Dreamweaver style-sheet-editing tools. 2.
PAGE 264
Use Design-Time style sheets Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. Design-Time style sheets allow you to show or hide design applied by a CSS style sheet as you work in a Dreamweaver document. For example, you can use this option to include or exclude the effect of a Macintosh-only or a Windows-only style sheet as you design a page.
PAGE 265
Use Dreamweaver sample style sheets Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. Dreamweaver provides sample style sheets that you can apply to your pages or that you can use as starting points to develop your own styles. 1. Open the CSS Styles panel by doing one of the following: Select Window > CSS Styles. Press Shift+F11. 2. In the CSS Styles panel, click the Attach External Style Sheet button.
PAGE 266
Use a tracing image to design a page Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article. You can insert an image file to use as a guide in designing your page. The image appears as a background image, which you can “design over” as you lay out your page. 1.
PAGE 267
Using Frames How frames and framesets work Deciding whether to use frames Nested framesets Work with framesets in the Document window Create frames and framesets Select frames and framesets Open a document in a frame Save frame and frameset files View and set frame properties and attributes View and set frameset properties Control frame content with links Provide content for browsers without frame support Using JavaScript behaviors with frames Note: The user interface has been simplified in Dreamweaver CC a
PAGE 268
content frame on the right displays the appropriate document for the link the visitor clicks on the left. A frame is not a file; it’s easy to think of the document that currently appears in a frame as an integral part of the frame, but the document isn’t actually part of the frame. The frame is a container that holds the document. Note: A “page” refers either to a single HTML document or to the entire contents of a browser window at a given moment, even if several HTML documents appear at once.
PAGE 269
To the top Nested framesets A frameset inside another frameset is called a nested frameset. A single frameset file can contain multiple nested framesets. Most web pages that use frames are actually using nested frames, and most of the predefined framesets in Dreamweaver also use nesting. Any set of frames in which there are different numbers of frames in different rows or columns requires a nested frameset.
PAGE 270
Create a predefined frameset and display an existing document in a frame 1. Place the insertion point in a document and do one of the following: Choose Insert > HTML > Frames and select a predefined frameset. In the Layout category of the Insert panel, click the drop-down arrow on the Frames button and select a predefined frameset. The frameset icons provide a visual representation of each frameset as applied to the current document.
PAGE 271
In the Document window’s Design view, when a frame is selected, its borders are outlined with a dotted line; when a frameset is selected, all the borders of the frames within the frameset are outlined with a light dotted line. Note: Placing the insertion point in a document that’s displayed in a frame is not the same as selecting a frame. There are various operations (such as setting frame properties) for which you must select a frame. Select a frame or frameset in the Frames panel 1.
PAGE 272
3. Select a document to open in the frame, and click OK (Windows) or Choose (Macintosh). 4. (Optional) To make this document the default document to display in the frame when the frameset is opened in a browser, save the frameset. To the top Save frame and frameset files Before you can preview a frameset in a browser, you must save the frameset file and all of the documents that will display in the frames.
PAGE 273
frameset’s Borders property is set to No and the frames sharing the border have Borders set to Default. Border Color Sets a border color for all of the frame’s borders. This color applies to all borders that touch the frame, and overrides the specified border color of the frameset. Margin Width Sets the width in pixels of the left and right margins (the space between the frame borders and the content).
PAGE 274
3. To specify how much space the browser allocates to each frame, select from the following choices in the Units menu: Pixels Sets the size of the selected column or row to an absolute value. Choose this option for a frame that should always be the same size, such as a navigation bar. Frames with sizes specified in pixels are allocated space before frames with sizes specified as percent or relative.
PAGE 275
To the top Using JavaScript behaviors with frames There are several JavaScript behaviors and navigation-related commands that are particularly appropriate for use with frames: Set Text Of Frame Replaces the content and formatting of a given frame with the content you specify. The content can include any valid HTML. Use this action to dynamically display information in a frame. Go To URL Opens a new page in the current window or in the specified frame.
PAGE 276
Using visual aids for layout Set rulers Set layout guides Using guides with templates Use the layout grid Use a tracing image Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article. To the top Set rulers Rulers help you measure, organize, and plan your layout.
PAGE 277
Emulate the fold (visible area) of a web browser Select View > Guides, and then select a preset browser size from the menu. Remove a guide Drag the guide off the document. Change guide settings Select View > Guides > Edit Guides, set the following options, and click OK. Guide color Specifies the color of the guide lines. Click the color swatch and select a color from the color picker, or type a hexadecimal number in the text box.
PAGE 278
Place a tracing image in the Document window 1. Do one of the following: Select View > Tracing Image > Load. Select Modify > Page Properties, then click Browse (next to the Tracing Image text box). 2. In the Select Image Source dialog box, select an image file and click OK. 3. In the Page Properties dialog box, specify the transparency for the image by dragging the Image Transparency slider, then click OK.
PAGE 279
Working with Spry widgets (general instructions) About Spry widgets Spry widgets resources and tutorials Insert a Spry widget Select a Spry widget Edit a Spry widget Style a Spry widget Get more widgets Change the default Spry assets folder Note: Spry widgets are replaced with jQuery widgets in Dreamweaver CC and later. While you can still modify existing spry widgets on your page, you cannot add new spry widgets.
PAGE 280
To the top Style a Spry widget Locate the appropriate CSS file for the widget in the SpryAssets folder of your site, and edit the CSS according to your preferences. For details on styling specific widgets, see the appropriate customization sections for each widget. You can also format a Spry widget by editing styles in the CSS panel, just as you would for any other styled element on the page.
PAGE 281
Working with div tags Insert and edit div tags CSS layout blocks Working with AP elements Note: In Dreamweaver CC and later, CSS Styles panel is replaced with CSS Designer. For more information, see CSS Designer. (Creative Cloud users only): Seven new semantic tags are available when you select Insert > Layout. The new tags are : Article, Aside, HGroup, Navigation, Section, Header, and Footer. For more information, see Insert HTML5 semantic elements from the Insert panel.
PAGE 282
Click the border of the div tag. Look for the highlighting to see the border. Click inside the div tag, and press Control+A (Windows) or Command+A (Macintosh) twice. Click inside the div tag, then select the div tag from the tag selector at the bottom of the Document window. 2. Select Window > CSS Styles to open the CSS Styles panel if it is not already open. Rules applied to the div tag appear in the panel. 3. Make edits as necessary.
PAGE 283
View CSS layout block outlines Select View > Visual Aids > CSS Layout Outlines. View CSS layout block backgrounds Select View > Visual Aids > CSS Layout Backgrounds. View CSS layout block box models Select View > Visual Aids > CSS Layout Box Model. You can also access CSS layout block visual aid options by clicking the Visual Aids button on the Document toolbar.
PAGE 284