Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day
ptg16476052 176 LESSON 8: Using CSS to Style a Site The final border style, border-color, is used to set the color for a border. ...
ptg16476052 The Box Model 177 8 they appear in the CSS document, so you can use styles like this to change the properties of jus ...
ptg16476052 178 LESSON 8: Using CSS to Style a Site padding: 0; margin: 0; } </style> </head> <body> <div c ...
ptg16476052 The Box Model 179 8 Output ▼ As you can see, I’ve created some space between the border of the inner and the text i ...
ptg16476052 180 LESSON 8: Using CSS to Style a Site Output ▼ I gave the outer <div> a large 40-pixel margin so that you co ...
ptg16476052 The Box Model 181 8 so, you can use the margin-left and margin-right properties or provide multiple values for the m ...
ptg16476052 182 LESSON 8: Using CSS to Style a Site Input ▼ .outer { border: 2px solid black; background-color: gray; padding: 1 ...
ptg16476052 The Box Model 183 8 Each element is, by default, either a block element or an inline element, but CSS provides the d ...
ptg16476052 184 LESSON 8: Using CSS to Style a Site a page design that only looks right if it’s at least 600 pixels wide. You co ...
ptg16476052 The Box Model 185 8 When overflow is hidden, the content that does not fit in the box is not displayed at all. Both ...
ptg16476052 186 LESSON 8: Using CSS to Style a Site As you can see, the three boxes run straight down the page. I’ve added a bor ...
ptg16476052 The Box Model 187 8 As you can see from the style sheet, I’ve set the float property for elements with the class “ri ...
ptg16476052 188 LESSON 8: Using CSS to Style a Site As you can see, when you put two floating elements together, they appear nex ...
ptg16476052 More Selectors 189 8 width: 33%; } second { clear: right; } .bottom { clear: both; } The additional I’ve added has ...
ptg16476052 190 LESSON 8: Using CSS to Style a Site You’ve already seen the basic descendant selector, which looks like this: p ...
ptg16476052 More Selectors 191 8 As you can see, both paragraphs have the drop cap. This is where the next sibling selec- tor co ...
ptg16476052 192 LESSON 8: Using CSS to Style a Site The :hover and :focus pseudo-classes are applied based on how the user is in ...
ptg16476052 More Selectors 193 8 Output ▼ A number of other pseudo-classes can be used, but they are not as widely supported in ...
ptg16476052 194 LESSON 8: Using CSS to Style a Site There are several other attribute selectors that you may find useful as well ...
ptg16476052 Workshop 195 8 You’ll continue to be introduced to new CSS properties in the lessons that follow. In Lesson 9, I exp ...
«
6
7
8
9
10
11
12
13
14
15
»
Free download pdf