From the course: Dreamweaver CS5 Essential Training
Unlock this course with a free trial
Join today to access over 22,400 courses taught by industry experts.
The anatomy of a CSS rule - Dreamweaver Tutorial
From the course: Dreamweaver CS5 Essential Training
The anatomy of a CSS rule
Styles in CSS are made up of two parts: the selector and the declaration. The selector comes first and describes the element on the page that is to be controlled through this rule. Here we see what is known as an element selector, and it will be controlling all heading 1s in our current document. Next, we have the declaration. The declaration is contained within these curly braces, which essentially tell the browser that all properties contained within should be applied to the element identified by the selector. Inside the declaration, we have properties, and values. Notice that they are separated by a colon and then ended with a semicolon. This tells the browser to move on to the next property if there are any available. In this case, our rule will take all heading 1s on the page, make them Arial, 1.4 ems in size, and red. Now if you are brand-new to CSS, the syntax is going to look a little intimating, but by breaking down the syntax into its individual parts, it's easy to see how…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
Understanding style sheets2m 16s
-
The anatomy of a CSS rule1m 48s
-
Setting CSS preferences6m 36s
-
The CSS Styles panel10m 2s
-
Controlling CSS through the Properties Inspector5m 14s
-
Using the Code Navigator7m 20s
-
Using CSS Enable6m 45s
-
Understanding element selectors8m 11s
-
Understanding class selectors8m 49s
-
Understanding ID selectors5m 59s
-
Understanding descendant selectors6m 51s
-
Attaching external style sheets7m 44s
-
-
-
-
-
-
-
-
-
-
-
-