Question:
Hi, I made a document, big, full of inline css, and I know that mixing css with html, using the style attribute directly on the element is bad practice…
But now, do you have a way to generate a common, unique css, grouping all inline css together? Or in this case, the business is to do it in the arm?
Answer:
Dreamweaver has a tool for this.
- In Code view (View > Code), select the entire style attribute that contains the inline CSS to be translated.
- Right-click and select CSS Styles > Convert Inline CSS to Rule.
-
In the Convert CSS Inline dialog box, type a class name for the new rule and do one of the following:
-
Specify a style sheet in which the new CSS rule should appear and click OK.
-
Select the document header as the location where the new CSS rule should appear and click OK.
-
It is also possible to convert the rules using the Encoding toolbar. The Encoding toolbar is only available in Code view.
-