120 likes | 256 Views
Cascading Style Sheets. Dreamweaver. Styles. Determine how the HTML code will display Gives designers much more control Over the look of the page With page layout. Style Sheet. List of Rules Each Rule has a Selector and a Definition Each Rule can have one or more Definitions
E N D
Cascading Style Sheets Dreamweaver
Styles • Determine how the HTML code will display • Gives designers much more control • Over the look of the page • With page layout
Style Sheet • List of Rules • Each Rule has a Selector and a Definition • Each Rule can have one or more Definitions • Each Definition can be applied to one or more selector
Syntax of Style Rules • Syntax: • Selector { definition;} • Selector { attribute: value;} h1 { font-size: 130%; }
Style Rules • h1,h2,h3,h4 { color: #ff3300; font-family: Arial; } • h1{ font-size: 160%; }
Three Kinds of Styles • Inline • Internal (Embedded) • External (Linked)
Inline • Very similar to regular HTML styles • Applied to each individual instance • <style =attribute:values> content </style> • Must be hand coded in Dreamweaver except with layers for positioning.
Internal • Placed in the <head> of your document • Rules are wrapped in style tags • Styles are wrapped in comment markers <style type =“text/css”> <!– H1 { font-size: 16px; } --> </style>
External • Totally separate from the HTML Document • Can be linked or imported • Referenced in the <head> section • <link rel=“stylesheet” href=“styles.css”> • @import “styles.css” • Can be used by many web pages
Methods • Redefine HTML tags • Create a new .Class • Advanced Selectors • Multiple tags • #ID’s
Layout • Use <div> tags for block elements • Create whitespace like a paragraph • Pulls content out of the page flow • Use <span> tags for inline elements • No break created • Like a wrapper for an element or section of text. • Layers use ID selectors