Dreamweaver lets you create Bootstrap documents and also edit existing web pages created with Bootstrap. Whether they are fully designed Bootstrap files or works-in-progress, you can edit them in Dreamweaver to not only edit code, but also use visual editing features such as Live View editing, visual CSS designer, Visual Media Queries, and Extract to make design changes.
Bootstrap version currently supported is v3.3.7.
When you created fluid grid documents, Dw made your web pages responsive by applying appropriate classes automatically. All you had to do was to focus on your content and decide how they reflow in the different form factors.
Similarly, in Bootstrap documents, you only have to focus on content and design and the responsiveness of your web page is taken care of by Dreamweaver, which is tightly integrated with the Bootstrap framework.
"Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts." - Bootstrap documentation.
To get started with Bootstrap documents in Dreamweaver, consider using Bootstrap starter templates. Dreamweaver includes a bunch of templates aimed at different types of websites you may want to create, for example, ecommerce or portfolio.
No, there isn’t a direct method of converting your existing fluid grid documents to Bootstrap documents. However, the user experience in Dreamweaver while creating and designing Bootstrap documents is similar to that of fluid grid documents. For example, you can get started by creating a Bootstrap document right from the New Document dialog box. While you create fluid grid documents for three basic form factors – Mobile, Tablet, and Desktop, for Bootstrap, you start by creating a document for basic screen sizes – small, medium, and large. The layout editing options that are displayed when you click elements in Bootstrap documents also look similar to that of fluid grid documents.
You can begin designing your Bootstrap website using one of the following options in the New Document dialog box:
- Bootstrap starter templates (Starter Templates > Bootstrap Templates) - Use this option if you want to get started quickly without the hassle of laying out your pages from scratch. Simply edit the text and replace the assets, if necessary, and your responsive website is ready. See Using Bootstrap starter templates for more information.
- Create an HTML document based on Bootstrap framework (New Document > HTML > Bootstrap) - Use this option if you want to build your website brick-by-brick using CSS and Bootstrap components within Dreamweaver. See Creating HTML documents based on Bootstrap framework for more information.
Bootstrap starter templates let you create web pages for popular themes in a jiffy. All the dependent files in the framework are saved automatically.
You can start building your responsive website by creating an HTML document based on Bootstrap framework. You can choose to create a set of Bootstrap framework files or use the existing files. Once the document is created, you can add Bootstrap components such as accordions and carousels using the Insert panel in Dreamweaver. Or, if you have Photoshop comps, you can use Extract to bring in images, fonts, styles, text, and more into your Bootstrap document.
Specify whether you want to create a new Bootstrap CSS or use an existing CSS.
If you choose to create a new CSS, a "css" folder is created in the site root, and the bootstrap.css file is copied into the new folder. If you choose to use an existing CSS, specify the path or browse to the location of the CSS.
The bootstrap.css file that is created is read-only. So, you cannot edit these styles using the CSS Designer; the Properties pane in CSS Designer is disabled in Bootstrap files.
If you want to modify the styling of your Bootstrap document, create another CSS file to override the existing styles, and then attach it to the document.
It is recommended that you open and edit documents that are created only in Bootstrap version 3 and later in Dreamweaver.
You can open Bootstrap files using one of the following ways:
- File > Open and browse to the Bootstrap HTML file.
- (Recommended) Create a Dreamweaver site and point the site folder to the folder that contains all your Bootstrap files.
When you open a Bootstrap HTML file in Dreamweaver:
- The rows are highlighted in gray dashed lines with rounded corners
- The columns are highlighted in blue dashed lines
Dreamweaver recognizes the CSS files associated with any Bootstrap HTML file if the CSS filename contains 'bootstrap'. The CSS file reference can be any or all of the following:
- Local path:
The minified or unminified CSS file is present locally. For example:
<link href="css/bootstrap.css" rel="stylesheet"> or
<link href="css/bootstrap.min.css" rel="stylesheet">
- Remote path:
A remote minified or unminified CSS file. For example:
<link href="http://somewebsite.com/css/bootstrap.css" rel="stylesheet">
<link href="http://somewebsite.com/css/bootstrap.min.css" rel="stylesheet">
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/<bootstrap_version_number>/css/bootstrap.min.css" rel="stylesheet">
Bootstrap style sheets in both link and import tags are supported in Dreamweaver. However, nested import - link to a style sheet that in turn imports another style sheet - is not supported.
Sometimes, you may require an element to be displayed in one viewport while in another viewport, you may want to hide the element for design purposes.
To hide a Bootstrap element, right-click and select Hide Element. The element is temporarily hidden from the view.
To view and unhide hidden elements, right-click and select Manage Hidden Elements. The hidden elements appear with a gray, hashed background. Click the eye icon to unhide the element.
The Bootstrap Components option in the Insert panel lists all the Bootstrap components that you can add to your web page in Dreamweaver.
To add a component, drag it from the panel onto the web page. Before you drop the component, take note of the visual aids such as Live Guides, Precision Insert (using DOM), and Position Assist. Use these aids to place the components quickly, and accurately on your page. For more information on inserting elements in your web page, see Insert panel overview.
Click the required row after which you want to add the new row. Then, click the Add new row icon. A Bootstrap row along with two child column elements with six columns each is added.
The code for the added row is as follows:
where * represents the current screen size in Dreamweaver.
Select the required column and then click the Add new column icon. The selected column is duplicated without its children.
All empty columns are assigned a minimum height of 20px. However, this height is not actually added to the page; it is shown only in Live view for easier insertion of elements within the columns.
Click the row or column that you want to duplicate and then click the duplicate icon at the lower right corner. The entire row or column is duplicated along with its contents.
The Add Row or Add Column option duplicates the row or column with classes, but without the content.
Resizing and offsetting columns become imperative especially when you are creating responsive designs for various viewports.
Click the required column and drag the handle on the right to resize. When you resize a column, the col-*-n class is added, where * represents the current media query (xs, sm, md, or lg) and n represents the number of columns that it occupies.
Dreamweaver detects the current screen size and adds the appropriate class. To resize columns to suit specific viewports, change the viewport size using the options in the lower-right corner or the scrubber. Then resize the columns as appropriate.
Click the required column and drag the handle on the left to offset the column. The offset is shown as a hashed area. When you offset the column, the col-*-offset-n class is added, where * represents the current media query (xs, sm, md, or lg) and n represents the number of columns by which it shifts.