Dreamweaver Tutorial: Working with Div Tags and Compound Rules using css

submitted by uklmhb on 09/29/16 1

Working with Div Tags and Compound Rules: Creating compound styles The compound selector can be used to combine two or more style rules to create a style definition that displays only when one style is contained within another. Compound styles are useful when you want to do something like use the Heading 1 tag multiple times to format headlines in different ways on the same Web page. For example, you could create one style for headlines that appear in the main story area of a page and then create another style for headlines that appear in the sidebar on the page and still use the Heading 1 tag to format both. Compound styles are created by combining ID, class, or tag styles and look like this: #sidebar h1 Class selectors The class selector is the most versatile selector option. Class styles can be used to format any element (from text to images to multimedia), and they can be used as many times as you like on any page in a Web site. Class style names always begin with a period, and you can create class styles with any name as long as you don't use spaces or special characters (hyphens and underscores are okay). Thus you could create a style called caption for the text that appears before your pictures, and you could create a style called photo-credit to format the name of a photographer differently from the caption. In that case, your class styles would look like this: .caption .photo-credit Dreamweaver helps you with the period (or a dot). ID selectors Think of ID styles as the building blocks of most CSS layouts (you find out how to create layouts with these styles in Chapter 6). ID styles must begin with a pound (#) sign, and, similar to class styles, Dreamweaver adds a pound (#) sign to the beginning of the style name automatically if you forget to include it. (Note: Don't include any space between the # and the style name.) Tag selectors The tag selector is used to redefine existing HTML tags. Select this option, if you want to change the formatting options for an HTML tag, such as the h1 (heading 1) tag or theul (unordered list) tag. Mohit Manuja adobecs5.in mohitsmail@yahoo.com ** I hold training session and courses in adobe dreamweaver and flash cs 5 / 5.5 with actionscript 3.0**

Leave a comment

Be the first to comment

Collections with this video
Email
Message
×
Embed video on a website or blog
Width
px
Height
px
×
Join Huzzaz
Start collecting all your favorite videos
×
Log in
Join Huzzaz

facebook login
×
Retrieve username and password
Name
Enter your email address to retrieve your username and password
(Check your spam folder if you don't find it in your inbox)

×