Add custom css layouts to the list of choices – Adobe Dreamweaver CC 2015 User Manual
Page 161
154
Layout and design
Last updated 6/3/2015
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.
Create New File
Adds CSS for the layout to a new external CSS stylesheet and attaches the new stylesheet to the page
you’re creating.
Link To Existing File
Lets you specify an existing CSS file that already contains the CSS rules needed for the layout.
This option is particularly useful when you want to use the same CSS layout (the CSS rules for which are contained
in a single file) across multiple documents.
7
Do one of the following:
• If you selected Add to Head from the Layout CSS in pop-up menu (the default option), click Create.
• If you selected Create New File from the Layout CSS pop-up menu, click Create, and then specify a name for the
new external file in the Save Style Sheet File As dialog box.
• If you selected Link to Existing File from the Layout CSS in pop-up menu, add the external file to the Attach CSS
file text box by clicking the Add Style Sheet icon, completing the Attach External Style Sheet dialog box, and
clicking OK. When you’re finished, click Create in the New Document dialog box.
Note: When you select the Link to Existing File option, the file you specify must already have the rules for the CSS file
contained within it.
When you put the layout CSS in a new file or link to an existing file, Dreamweaver automatically links the file to the
HTML page you’re creating.
Note: Internet Explorer conditional comments (CCs), which help work around IE rendering issues, remain embedded
in the head of the new CSS layout document, even if you select New External File or Existing External File as the
location for your layout CSS.
8
(Optional) You can also attach CSS style sheets to your new page (unrelated to the CSS layout) when you create the
page. To do this, click the Attach Style Sheet icon above the Attach CSS file pane and select a CSS style sheet.
For a detailed walk-through of this process, see David Powers’s article,
Add custom CSS layouts to the list of choices
1
Create an HTML page that contains the CSS layout you’d like to add to the list of choices in the New Document
dialog box. The CSS for the layout must reside in the head of the HTML page.
To make your custom CSS layout consistent with the other layouts that come with Dreamweaver, you should save
your HTML file with the .htm extension.
2
Add the HTML page to the Adobe Dreamweaver CS5\Configuration\BuiltIn\Layouts folder.
3
(Optional) Add a preview image of your layout (for example a .gif or .png file) to the Adobe Dreamweaver
CS5\Configuration\BuiltIn\Layouts folder. The default images that come with Dreamweaver are 227 pixels wide x
193 pixels high PNG files.
Give your preview image the same file name as your HTML file so that you can easily keep track of it. For example,
if your HTML file is 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.