Index

Symbols

“...” (double quotation marks), declaration lists, 39

‘...’ (single quotation marks), 39

/ (slash), comments, 67

& (ampersand), character entities, 129, 424

* (asterisk), universal selector, 6163

{ } curly brackets. See curly brackets { }, CSS rules

Numbers

2D transformations, 312315

3D

stacking objects in, 294295

text shadow effect, 168

transformations, 316319

8-bit Unicode Transformation Format (UTF-8) character set, 126, 423428

A

absolute positioning, 289291

absolute values

font size, 143144

transforming length value, 311

vertical text alignment, 174175

accessibility

access keys for, 339

color and, 201

content in <body> for, 240

CSS2 emphasis on, 7

accesskey attribute, 339

:active pseudo-class, 8489

adaptive design

large.css, 368369

with media queries, 370373

medium.css, 366368

print.css, 368369

responsive Web design, 353

small.css, 366367

adjacent sibling selector, 7879

adjacent siblings, family tree, 70

Adobe’s Kuler tool, online color scheme, 200

:after pseudo-element, 96, 9899

Aggregate method, style sheets, 384

alpha values

color transparency, 190

element opacity, 301

text color, 203

alphabetical order, selectors, 378

ampersand (&), character entities, 129, 424

analogous color-combination scheme, 198

angle quotation marks, 244

angle value

2D transforms, 314

3D transforms, 318319

linear gradients, 191192

transformations, 311

ANI images, 239

animations, in CSS3, 14

apps, mobile, 357

<article> tag, 2829, 31

<aside> tag, 2829, 31, 332

aspect-ratio, media queries, 104105

asterisk (*), universal selector, 6163

attachment property, background image, 205206, 208

attributes, assigning to styles, 2, 100103

Audio and Video Timed media playback, 27

author styles, 118

auto value

background-image, 205

background-size, 209

clip, 298299

column-count, 278279

cursor, 238

margin, 265267

overflow, 260261, 336

overriding inheritance, 116

position, 292293

table-layout, 228

text-align, 171172

text-align-last, 172

text-justify, 173

width and height, 256

z-index, 294295

automatic method, table-layout, 228

Available symbol, browsers, 410

B

backface-visibility property, 3D transformations, 318

background, specifying gradient as, 195

background color

choosing, 196197

differentiating hypertext from text, 340

setting, 204205

specifying with background image, 211

styling for print, 114

text and, 203

using CSS sprites, 344

background images

best practices, 404

border, 274275

differentiating hypertext from text, 340

gradients and multiple, 212216

new in CSS3, 14

setting, 205211

using CSS sprites, 343344

background properties

adding multiple images and gradients, 212216

getting started, 184

overview of, 183

putting it all together, 217218

quick reference, 414

setting background color, 204

setting background images, 205211

setting text color, 202203

background property, 204, 251

background shorthand property, 212216

background-color property

setting background color, 204

text shadow effects, 168170

transitions, 321

values, 212

background-image property

setting background images, 206

setting gradients in background, 195

transitions, 321

values, 212

backward compatibility, XHTML2 and, 25

:before pseudo-element, 96, 9899

best practices

CSS libraries and frameworks, 376

minify CSS, 396398

overview of, 375

readable style sheets, 376380

style sheet strategy, 381385

summary of, 399407

troubleshooting CSS code, 386389

validating CSS code, 395

viewing CSS with Firebug, 390392

viewing CSS with Web Inspector, 390, 393394

billing systems, Web font service bureaus, 143

blink value, obsolete for text, 180

block level elements, 22, 330

block value, display property, 252, 254

Blueprint CSS framework, 376

blur

setting element’s shadow, 302303

text drop shadow, 166

text shadow effect, 168

<body> tag

adding unique name or ID to each, 401

choosing background color for body, 196

HTML document setup, 30

HTML document structure, 19

keeping content within, 240

margin setup, 266, 291

specifying styles with @media, 112

bold, bolder, boldest, for text, 149

border property, 190, 251, 269270

border-bottom property, 340, 359

border-collapse property, 230231

border-image property, 274275

border-radius properties, 272273

borders

background image for, 208, 211, 274275

collapsing between table cells, 230231

colors, 197

CSS resets for, 359

element edge within, 287

of element’s box, 251

fixing box model for older versions of IE, 338

multiple, 304

new in CSS3, 14

rounding corners, 272273

setting, 269271

setting how box sizes, 258

setting image, 274275

setting padding, 276277

border-spacing property, 229

border-style values, 270271

border-width values, 270271

both keyword, clear, 264

box properties

border image, 274275

coming soon, 280

controlling overflow content, 259261

displaying element, 252254

element’s border, 269271

element’s margin, 265267

element’s outline, 268

element’s padding, 276277

element’s width and height, 255258

floating elements in window, 262264

multicolumn text layout, 278279

overview of, 247249

putting it all together, 281282

quick reference, 417419

rounding border corners, 272273

setting how box sizes, 258

understanding element’s box, 250251

box shadows, 302304

boxes

fixing for older IE versions, 333, 337338

new features in CSS3, 15

understanding, 250251

box-resize property, 251

box-shadow property, 190, 302303

box-sizing property, 258, 338

break points, 352353, 366367

break tag clearfix, fixing float problem, 335

brightness, using color wheel to choose, 198

browser extensions, CSS3, 1213

browsers

default margin issues, 267

default styles, 20, 358362

defining style sheets, 118

displaying documents, 286

evolution of CSS, 67

how CSS works, 45

inherited styles, 20

mouse pointer appearance and, 238

responsive design for multiple. See responsive Web design

symbols indicating values available for use by. See quick reference

teaching to count, 242243

using HTML5, 29

Web font formats for, 134135

Web font support, 134

z-index order determined by, 295

bullets, 223227

C

cache, font file, 139

Canvas element, new in HTML5, 27

capitalize value, text-transform, 164165

caption keyword, mimicking visitor’s font style, 152

caption-side property, tables, 233234

cascade order

!important declaration and, 117118

best practices, 403

determining, 119121

grouped selectors and, 66

troubleshooting CSS code, 386

typeface overrides and, 132

case, setting text, 164165

characters

encoding HTML, 129

encoding HTML and UTL, 423428

specifying character set, 126

child elements

box model, 250

of element’s box, 250

family tree, 70

floating elements in window, 263

in nested tags, 250

pseudo-classes for styling, 9091

setting position of, 293

child selectors, 7677, 346

choke, setting shadows, 302

Chrome, 393

circle shape value, radial gradients, 193

class selectors

CSS rules, 9

defining, 5356

elements styled by, 36

troubleshooting CSS code, 386

classes

defining reusable, 5356

generic names for, 401

mixing and matching, 402

setting up float, 264

clear property, 264

clearfix class, 335

clip property

setting background images, 205206, 210

text-overflow, 261

visibility area, 298299

clipping, defined, 288

colon (:), CSS declarations, 39

color

best practices, 404405

emotional associations of color, 196

gradients. See gradients, color

links, 8687

new in CSS3, 14

for readable style sheets, 378379

shadows, 302

text drop shadows, 166167

transitioning CSS properties, 320324

color palette, 196, 200

color properties

accessibility for visually impaired, 201

choosing color palette, 196201

choosing color values, 185190

creating color gradients, 191195

getting started, 184

other ways to add color, 190

overview of, 183

putting it all together, 217218

quick reference, 414

color property, 106, 202

Color Scheme Designer tool, 200

color stop, 192, 194

color values

alpha values for transparency, 190

backgrounds, 204

borders, 270271

for color keywords, 185187

color wheel, 198

HSL, 189

multiple background images, 213

overview of, 185

RGB, 188189

shadows, 303

text, 202

color wheel

basics, 198200

online tool for advanced, 200

color-index property, media queries, 106

Colour Contrast Check tool, 203

ColRD: Palette Creator tool, 200

column-count property, 278

column-gap property, 279

column-rule property, 279

columns. See multicolumn layouts

combinatory selectors, 71

comments

adding to CSS, 6768

best practices, 406

grouping selectors with, 6466

section headers as, 378379

setting up conditional styles for IE, 364365

compact property, 254

complementary color-combination scheme, 199

compound color-combination scheme, 199

compression, CSS code, 396398

condensed fonts, 150

conditional styles, Internet Explorer

fixing box model for older versions, 338

overview of, 363365

responsive Web design, 353, 370373

content. See also generated content properties

adding using CSS, 240241

background color, 196197

controlling overflow, 259260

defining background image, 208, 211

of element’s box, 250

new features in CSS3, 15

progressive enhancement and, 355

setting how box sizes, 258

styling for print, 114

content property, 240, 242243, 250251

content-box value, box-sizing, 258

contextual selectors, 70

contextual styles

descendants, 7175

only children, 7677

overview of, 71

siblings, 7881

converting licensed fonts, 140

copy, color(s) for, 197

counter lists, multiple, 242243

couplet values, RGB hex, 188

CSS (Cascading Style Sheets), overview

browser extensions, 1213

defined, 1

evolution of, 67

HTML and, 8

libraries and frameworks, 376

rule parts, 11

styles, 2

types of rules, 910

understanding, 35

what’s new in CSS3, 1415

word processor styles vs., 3

CSS basics

basic selectors, 36

comments, 6768

embedded styles, 4042

external styles, 4349

grouping, 6466

HTML tags, 5052

inline styles, 3739

overview of, 35

reusable classes, 5356

unique IDs, 5760

universal styles, 6163

CSS resets

Eric Meyer’s, 362

overriding browser default styles with, 358359

with universal selectors, 63

using universal selector for simple, 360

what you should reset, 359

Yahoo’s Reset CSS, 361

CSS sprites

adding CSS image rollovers to Web page, 342344

best practices using RGB for, 405

creating using background images, 211

origin of, 344

overview of, 342

CSS Validator, 395

CSS1 (CSS Level 1), 7

CSS2 (CSS Level 2), 7

CSS2.1 (CSS Level 2.1), 118

CSS3 (CSS Level 3), 7, 1415, 29

CSS3 Gradient Generator, 195

CSS4 (CSS Level 4), working draft, 15

CUR images, 239

curly brackets { }, CSS rules

class selectors, 53

embedded styles, 41

external CSS file, 45

HTML tags, 5052

troubleshooting CSS code, 386

currentcolor keyword, 188, 204

cursive fonts, 128

cursors, mouse pointer appearance, 238239

D

debugging CSS, 118

decimal values, color, 185187, 189

decimals, setting bullet style, 223

declarations

colons in, 39

CSS rules and, 11

grouped selectors receiving same, 6466

HTML tags and, 3839, 52

making !important, 117118

quotation marks in, 39

reusable classes and, 54

troubleshooting CSS code, 386, 389

unique IDs and, 58

universal styles and, 61

viewing CSS, 392, 394

default styles, browser, 20, 358362

DeGraeve’s Color Palette Generator tool, 200

<del> tag, text strikethrough vs., 180

dependent class selector, 36, 54

dependent ID selector, 36, 60

descendants, 7071, 115116

design and interface techniques

creating CSS drop-down menu, 345346

creating multicolumn layouts with float, 330333

fixing box model for older versions of IE, 337338

fixing float problem, 334336

getting started, 328330

putting it all together, 347348

styling links vs. navigation, 339341

using CSS sprites, 342344

dingbats, 129

display area, browser, 287

display property, 252254, 297

<div> tag, 27, 56, 332

Divide and Conquer method, style sheet strategy, 383

doctype (<!DOCTYPE>)

browser modes set by, 363

HTML document structure, 19, 3031, 399

for markup languages, 29

reasons to include, 3233

document type definition (DTD), 337338

documents

basic HTML, 3031

browser windows displaying, 286

editing in HTML5, 27

parts of, 286287

structure of HTML, 20

double quotation marks (“...”), declaration lists, 39

drag-and-drop, 27

drop shadows, 166168, 302303

drop-down menus, CSS, 345346

DTD (document type definition), 337338

Dynamic method, style sheet strategy, 385

dynamic pseudo-classes, 8283, 8889, 320324

dynamic styles, 402

E

editing declarations, 392, 394

element edge, 287

element family tree, 70

elements, HTML

applying CSS properties to specific, 23

block-level, 22

controlling overflow, 259261

displaying, 252254

floating in window, 262264

including default styles for, 401

inspecting, 392394

not setting style for particular, 9495

setting border, 269270

setting margins of, 265267

setting outline, 268

setting padding, 276277

setting positions, 290291

setting width and height, 255258, 287

types of, 2123

understanding box of, 250251

visual formatting properties. See visual formatting properties

ellipsis, text-overflow property, 261

elliptical corners, borders, 273

elliptical shape value, radial gradients, 193

<em> tag, 20, 7281, 144145, 160, 174

Emastic CSS framework, 376

Embedded OpenType (EOT) Web font format, 134135, 137138, 140

embedded style sheets

adding, 4042

making declaration !important, 117118

not placing in final code, 42

using @media rule to specify styles, 112

emboss text, text shadows, 168

emotional associations, color, 196

empty-cells property, 232

encoding

HTML and UTL character, 423428

HTML character entities, 129

End User License Agreements (EULA), Web fonts, 140

EOT (Embedded OpenType) Web font format, 134135, 137138, 140

EULA (End User License Agreements), Web fonts, 140

evolution, of CSS, 67

expanded fonts, 150

extensions, CSS browser

creating color gradients, 191

defined, 12

importance of coding with, 326

external CSS files

adding styles to Web sites, 4349

defining CSS rules in, 52, 57

external style sheets

best practices, 400

making declaration !important, 117118

placing all styles in, 381

progressive enhancement and, 355

using @media rule to specify styles, 112

F

fantasy fonts, 128

<figcaption> tag, HTML5, 28

<figure> tag, HTML5, 28

fire effect text, text shadows, 168

Firebug, 390392, 394

:first-child pseudo-class, 9091

:first-letter pseudo-element, 9699

:first-line pseudo-element, 9699

:first-of-type pseudo-class, 9091

fixed design, multicolumn layout, 332333

fixed method, table-layout, 228

fixed positioning, 290291

Flash, 20

float property, 262264, 330336

:focus pseudo-class, 8889

font families

defined, 125

fonts vs., 130

generic, 127128

naming, 137

setting font-stack, 130132

font properties

condensed and expanded fonts, 150

dingbats, 129

encoding HTML character entities, 129

generic font families, 127128

getting started, 124

making text italic, 147148

overview of, 123

putting it all together, 155156

quick reference, 412

setting bold, bolder, boldest, 149

setting font-stacks. See font-stacks

setting multiple font values at same time, 152154

setting size, 144145

sizing understudy fonts, 146

small caps, 151

specifying character set, 126

understanding Web typography, 125

using Web fonts, 133

font property, 152154

Font Squirrel Web site, 140

@font-face Kit Generator, Font Squirrel, 140

@font-face rule

italic text, 147

placing at top of CSS code, 378

small caps, 151

Web font service bureaus using, 142143

Web fonts using, 136140

font-family property, 154

fonts. See also Web fonts

applied to styles, 2

new features in CSS3, 15

for readable style sheets, 378

word processor styles vs. CSS, 34

font-size property, 143145, 153, 175

font-size-adjust property, 146

font-stacks

readable style sheets, 378379

setting, 130132

setting with Web fonts, 135139

font-stretch property, 138139, 150

font-style property

defining Web font to font stack, 138139

making text italic, 147148

mimicking visitor’s font style, 152

setting multiple font values, 152, 404

font-variant property, 151, 153

font-weight property, 138139, 149, 153

<footer> tag, HTML5, 2829, 31

footnotes, hyperlinking, 175

foreground color, 201203

formats

visual. See visual formatting properties

Web font, 134135

forms, background color for, 197

frame effect, box shadows, 304

frame tags, eliminated in HTML5, 27

frameworks, CSS libraries and, 376

functionality

organizing style sheets by, 378

progressive enhancement guidelines, 355

G

general sibling selector, 78, 8081

generated content properties

adding content using CSS, 240241

getting started, 236237

overview of, 235

putting it all together, 246

quick reference, 416

specifying quote style, 244245

teaching browser to count, 242243

generic class names, 401

generic font families, 127128, 131

glyphs

encoding HTML and UTL characters, 423428

encoding HTML characters, 129

overview of, 125126

graceful degradation, 356

gradients, color

adding to backgrounds, 206, 216

best practices, 405

creating, 191195

graphics

as bullets, 223

CSS Sprites. See CSS Sprites

grids, page layout using column, 330333

grouping selectors, 6466, 402

H

hanging indents, bulleted lists, 225

hanging punctuation, 181

<head>

defining class selector in, 53

defining CSS rules in, 52, 57

embedded styles in, 4042

HTML document structure, 19, 30

linking to external CSS files, 46

specifying character set in, 126

using @media rule to specify styles, 112

using links to add styles in, 400

<header> tag

background color for, 197

conditional styles for IE, 365

defined, 2829

HTML document structure, 31

height

browser, 286

CSS resets for line, 359

document, 287

element, 287

of element’s box, 250

fixing box model for older versions of IE, 337338

viewport, 287

height property, 106, 250251, 255257

hex values, 185189

<hgroup> tag, HTML5, 28

hidden keyword, 260, 296

horizontal alignment, centering numbers in blocks, 336

horizontal text alignment, 171173

hotspot, mouse pointer, 239

:hover pseudo-class, 8489, 167

HSL (hue, saturation, and lightness) values, 189190, 198

HSVA value, adding text color with, 203

HTML (HyperText Markup Language)

basic document structure, 19

browser inherited styles and, 20

CSS and, 35, 8

CSS vs., 1

defined, 17

properties, 1920

selectors vs. attributes, 11

types of elements, 2123

understanding, 18

UTL character encoding and, 423428

HTML selectors

CSS browser extensions working with, 13

CSS rules, 911

determining cascade order by specificity, 121

redefining HTML tags, 5052

styling HTML elements, 2123, 36

HTML4, 24

HTML5

elements, 2123

evolution of, 2426

new features, 27

overview of, 17

structure of, 2833

understanding, 1820

HTML5 Shiv, 3233

hue, HSL values, 189190, 198

hyperlinks

setting negative margins, 266

turning off underlining on, 180

using color change to show states of, 203

using with footnotes, 174

I

icon: keyword, 152

icons

CSS sprites for, 342344

dingbats, 129

Web fonts for. See Web fonts

id attribute, unique IDs, 58

ID selectors

adding to body tag of page, 401

CSS rules, 10

defining unique IDs, 5760

determining cascade order, 121

elements styled by, 36

troubleshooting CSS code, 386

using specific ID names, 401

IE Conditional, 3233

iframes, 286

image rollovers, 342344

images

resizing using width and height properties, 257

setting background, 205211

setting border, 274275

setting bullet style using, 223

using as custom cursor, 239

<img> tag, 174, 404

@import rule

adding styles with, 400

best practices, 381

discouraged due to browser issues, 49

favoring <link> over, 406

importing external CSS files, 4849

importing style sheets, 48

placing at top of CSS code, 378

style sheet methods using, 384385

!important declaration

avoiding, 403

cascade order and, 117118, 120

troubleshooting CSS code, 389

importing external styles, to site, 4344, 4849

indented paragraphs, 176

indented text, bulleted lists, 225

inherent styles, 115116, 120121

inherit keyword, 291, 296

inherit value

clip, 298

display, 253

inheritance of styles, 116

opacity, 301

inheritance of styles, 115116, 119121

inline elements, 21

inline styles, 3740, 120

inline value, display, 252

inline-block value, display, 253

inset, shadows, 302304

interaction, styling Web page, 88

Internet Explorer

adjusting CSS for, 363365

best practices, 405

converting OTF/TFF files to, 140

defining Web font to font stack, 135139

fixing box model for older versions of, 337

fixing code in, 405

HTML5 for older versions of, 3233

quirks mode, 363

resetting browser default styles, 360

Intuit CSS framework, 376

iPhone, 107110

ISO 8859-1 character set, 126

italicized text, 147148, 340

J

JavaScript, 8, 3233

justified text, 173

K

kerning, 160, 181

keywords

color, 185187

linear gradients, 191

overflowing content, 260

radial gradients, 193

shadow, 302303

transformation origin, 315

L

:lang() pseudo-class, 9293

language, styling for specific, 9293

large.css, 368369

:last-child pseudo-class, 9091

:last-of-type pseudo-class, 9091

layouts

multicolumn, 278279, 330333

Web design. See responsive Web design

leading, adjusting, 162163

left keyword, 263264

legal issues, Web fonts, 140

legibility, and font size, 144

length value

adjusting leading, 162163

background images, 208209

borders, 270, 272

clipping visibility area, 299

defined, 311

element width or height, 256

indenting paragraphs, 176

letter spacing, 159

margins, 266

multicolumn text layout, 278

multiple background images, 215

padding, 276

positioned elements, 292

shadows, 302303

spacing table cells, 229

text drop shadows, 166

transformations, 311

transitions, 320324

word spacing, 161

letterforms. See fonts

letterpress text, text shadows, 168

letters

adjusting space between, 159160

bullet style for, 223

letter-spacing property, 159160

libraries and frameworks, CSS, 376

licensed fonts, 140143

lightness, HSL values, 189190, 198

line height, CSS resets for, 359

linear gradients, 191192, 195

line-height property, 153, 162163

line-through, text, 179

link pseudo-classes

adding transitions between states, 320324

importance of order, 89

overview of, 8283

styling links, 8487

link states

add CSS image rollovers to Web page, 344

contrasting link appearances, 86

styling all, 406

<link> tag

best practices, 381, 400

conditional styles for IE, 364

connecting external CSS and HTML files, 43, 45

favoring over @import, 406

linking to style sheets with, 4647

media queries, 108111

specifying styles with @media rule, 112

WFSBs using, 142

links

color for, 197

contrasting appearances for, 8487

to external CSS file, 43, 4647

minimizing, 47

navigation vs. styling, 406

states, 82

to style sheet, 46

styling, 8487

styling documents in <head>, 400

styling navigation, 339341

text shadows for, 167

troubleshooting CSS code, 386

list properties

bullets, 223225

getting started, 220222

multiple list styles, 226227

quick reference, 415

list-item value, display, 253

lists

background color for, 197

sequentially numbered, 242243

list-style shorthand property, 226227

list-style-image property, 224, 226

list-style-position property, 225, 227

list-style-type property, 223, 227

Little Trouble Girl font, 139

local versions, Web font service bureau, 143

logical operators, conditional styles for IE, 364

LoVe HAte mnemonic, pseudo-element order, 89

lowercase text, 164

M

Mac fonts, online resource, 139

margin property, 251, 265267

margins

collapse of, 267

CSS resets for, 359

of element’s box, 251

favoring padding over, 405

indenting paragraphs and, 176

setting element’s, 265267

setting in body tag, 291

table cells not using, 229

markup languages, 19, 29

matrix() value, 2D transforms, 314

matrix3d() value, 3D transforms, 319

max-width property, 257

media queries

best practices, 402

embedding into style sheets, 112113

multi-screens with, 357

new in CSS3, 15

overview of, 104106

in responsive Web design, 352, 370373

specifying styles, 107111

@media rule

best practices, 402

placing at top of CSS code, 378

specifying styles with, 112113

media type

determining cascade order value, 120

specifying style sheets for particular, 47

values, 104

medium.css, 366368

menu: keyword, 152

message-box: keyword, 152

Meyer’s CSS reset, 362

mid-width property, 257

Minify CSS Compressor, 396398

minifying your CSS code, 396398, 407

mobile devices

adapting to environment, 366373

CSS not accommodated by many browsers, 5

media queries specifying styles for, 107110, 370373

multi-screen strategy for, 357

progressive enhancement across multiple, 354356

monochromatic color schemes, 198

monochrome color schemes, 198

monochrome property, media queries, 106

monospace fonts, 127128

mouse pointer, changing appearance, 238239

-moz- extension, CSS, 1213

-ms- extension, CSS, 1213

multicolumn layouts

with float, 330333

for text, 278279

multiple backgrounds

adding with background shorthand, 212216

layering images, 205

multi-screens, 357

N

naming conventions

class and ID selectors, 60

defining Web font to font stack, 137

external CSS files styling HTML pages, 45

generic class names, 401

reusable classes, 5356

unique IDs, 57

<nav> tag, 2829, 31

navigation

choosing color for links, 197

preventing noise, 345346

styling for print, 114

styling links, 339341

negative margins, 266

neon glow text effect, 168

nested comments, not allowed, 67

nested tags, 70, 250

“New in CSS3” mark, in this book, 14

newspaper style, horizontal text alignment, 171

noise, reducing navigation, 345346

none value

clear property, 264

display property, 254255, 297

float property, 263

inheritance of styles, 116

normal flow, 287

normal text, 147148

normal value, inheritance of styles, 116

Not available symbol, browsers, 410

nowrap value, controlling white space, 177178

:nth-child(#) pseudo-class, 9091

:nth-last-of-type(#) pseudo-class, 9091

:nth-of-type(#) pseudo-class, 9091

number sign (#), ID rules, 5758

numbers

adjusting font size for understudy fonts, 146

bullet style, 223

centering in blocks horizontally, 336

font-weight, 149

multiple counter lists, 242243

positioning in browsers, 291

stacking elements in 3D, 294295

transformations, 311

O

-o- extension, CSS, 1213

oblique text, 147148

offset, shadows, 166, 302

One for All method, style sheet strategy, 382

online references

color and accessibility, 201

Colour Contrast Check tool, 203

CSS frameworks, 376

CSS3 development, 7

CSS3 Gradient Generator, 195

CSS4 working draft, 15

development of new text properties, 181

Eric Meyer’s CSS reset, 362

Firebug, 391

Font Squirrel Web site, 140

Mac and Windows fonts, 139

online color scheme, 200

Scalable Vector Graphics, 20

Web font service bureaus, 142

Web font stores, 142

Web Inspector, 393

Web Typography NOW, 143

Web-safe fonts, 133

World Wide Web Consortium, 10

Yahoo’s Reset CSS, 361

opacity

alpha values for color transparency, 190

new features in CSS3, 15

setting element’s, 300301

transitioning CSS properties, 320324

opacity property, 190, 300301

OpenType (OTF) Web font format, 134, 138, 140

optimization, creating minified version of CSS code, 396398

organization scheme, readable style sheets, 378379

orientation property, media queries, 106

origin property, background images, 205206, 211

OTF (OpenType) Web font format, 134, 138, 140

outline property, 268

outlines

CSS resets for, 359

defining color with, 190

of element’s box, 251, 268

text, 181

overflow property

controlling content, 257, 259260

fixing float problem with, 335

setting for text, 261

overlapping text, 266

overlines, text, 179180

overrides

float property, 263

font size, 144

font-stack, 132

mouse pointer, 238

P

padding

background images, 208, 211

CSS resets for, 359

of element’s box, 251

favoring margins over, 405

fixing older versions of Internet Explorer, 338

indenting paragraphs and, 176

multicolumn layouts and, 333

padding property, 276277

page breaks, styling for print, 114

page structure, style sheets by, 378

paragraphs

indenting, 176

justifying last line of text in, 172

parent elements

centering element within, 267

family tree, 70

floating elements in window, 263

in nested tags, 250

positioning, 293

styling descendants, 71

parent selector, 71, 7677

percentage values, RGB, 189

perspective property, 3D transformations, 317

perspective-origin property, 3D transformations, 317

picture fonts, 129

pixel perfection, 354

position property, background images, 205206, 208209, 215

positioned elements, 291295

positioning

bullets, 225

radial gradients, 193

table captions, 233

transitioning CSS properties, 320324

types of, 288291

pre value, white space, 177178

preceding sibling elements, family tree, 70

presentation tags, eliminated in HTML5, 27

primary font, 130

print

indenting paragraphs for, 176

specifying styles with media queries, 107, 109111

styling for, 114

print.css, responsive Web design, 368369, 373

progressive enhancements, 352, 354356

properties

CSS rules and, 11

giving transitions to, 320321

inheritance of styles, 115116

media queries, 104105

overview of CSS, 4

redefining HTML tag, 5052

styling based on HTML tags, 20, 23, 3839, 100103

troubleshooting CSS code typos, 386

pseudo-classes

defining dynamic, 8889

not styling elements with, 9495

overview of, 8283

quick reference, 411

setting bullet type, 223

styling children, 9091

styling contrasting links, 8487

styling for interaction, 88

styling for languages, 9293

styling links, 84

pseudo-elements

defined, 96

highlighting beginning of article, 9697

quick reference, 411

setting content before and after element, 9899

working with first letters and lines, 96

pt (point) size, print media, 144

Q

<q> tag (quotation), 236237, 244245

quick reference

basic selectors, 410

box properties, 417419

color and background properties, 414

font properties, 412

list properties, 415

pseudo-classes, 411

pseudo-elements, 411

text properties, 413

transform properties, 421

transition properties, 422

user interface and generated content properties, 416

visual formatting properties, 420

quirks mode, Internet Explorer

defined, 363

fixing box model for older versions of Internet Explorer, 337

quotation (<q> tag), 236237, 244245

quotation marks

specifying quote style with <q> tag, 236237, 244245

tips for using, 39

quotes property, 244245

R

radial gradients

available in all browsers, 191

overview of, 193194

repeating, 195

readable style sheets, best practices

@rules at top of CSS code, 378

colors, fonts, and other constants, 378

introduction and TOC, 376377

organization scheme, 378379

overview of, 376

section headers, 378

specificity, 380

Recently available symbol, browsers, 410

rect value, clip, 298299

references

online. See online references

for subjects in this book. See quick reference

rel property, troubleshooting CSS code, 386

relationship, link, 46, 386

relative positioning, 175, 289291

relative values

aligning text vertically, 174175

font sizes, 143144

transforming length value, 311

rendering engine, 45, 1213

repeat property, background images, 205207, 214

repeating gradients, 195

repetition, avoiding unnecessary code, 403

Reset CSS, Yahoo, 361

resetting styles, responsive Web design, 352

resolution property, media queries, 106

responsive Web design

adapting to environment, 366373

adjusting CSS for Internet Explorer, 363365

developing multi-screen strategy, 357

getting started, 350351

overview of, 349

with progressive enhancements, 354356

resetting browser default styles, 358362

understanding, 352353

reusable classes, 5356, 401

RGB (red, green, blue)

best practices, 404

decimal values, 189

hex values, 188

percentage values, 189

setting alpha channels for decimal values, 190

RGBA value, adding text color, 203

right keyword, 263264

rotate(), rotateX(), or rotate(Y) value, 2D transforms, 314315

rotate3d() value, 3D transforms, 319

rotateZ() value, 3D transforms, 319

rounded corners, borders, 272273

rules, CSS

adding embedded style to Web page, 4142

applying with CSS selectors, 36

class selector, 9

combining into selector lists, 402

defining Web font to font stack, 137

external CSS file, 45

HTML selector, 9

ID selector, 10

multicolumn layout, 332333

parts of, 11

placing @rules at top of CSS code, 378

separating chunks of content, 197

syntax of, 11

tips for, 42

troubleshooting CSS code, 389

types of, 910

universal selector, 10

using specificity for hierarchy of, 380

@rules, placing at top of CSS code, 378

run-in value, display, 253

S

Safari, 393

sans-serif fonts, 127

saturation, HSL values, 189190, 198

Scalable Vector Graphics (SVG) Web fonts, 20, 135, 139

scale(), scaleX(), or scale(Y) value, 2D transforms, 314315

scale3d() value, 3D transforms, 319

scaleZ() value, 3D transforms, 319

scientific notation, 175

scroll, 205, 208, 215

scroll keyword, overflow, 260

search engines, content property and, 241

section headers, readable style sheets, 378379

<section> tag, 2829, 336

selective styling

!important declaration, 117118

@media rule, 112113

based on context. See contextual styles

based on tag attributes, 100103

cascade order, 119121

element family tree, 70

inheritance of styles, 115116

media queries, 104111

overview of, 69

for print, 114

with pseudo-classes. See pseudo-classes

with pseudo-elements, 9699

selectors

attribute, 100

basic CSS, 36

combinatory, 71

grouping, 6466

HTML. See HTML selectors

organizing style sheets by types of, 378

pseudo-class, 83

pseudo-element, 96

quick reference to, 410

styling elements to exclude certain, 9495

troubleshooting CSS code, 386

semicolons (;)

character entities beginning with, 129

defining styles directly in HTML tag, 38

locating in !important declaration, 118

separating multiple declarations, 11

troubleshooting CSS code, 386

separate value, border-collapse, 230231

serif fonts, 127

SGML (Standard Generalized Markup Language), 19

shadows

adding text drop, 166170

setting element’s, 302303

shape value, radial gradients, 193

shorthand properties

!important, 404

background, 212216

best practice to use, 404

font, 152154, 163

list-style, 226227

matrix(), 314

matrix3d(), 319

overriding value set by, 154

transition, 322324

sibling selector, 7879

siblings, family tree, 70

single quotation marks (‘...’), 39

size, file

best practices, 381

drawbacks of single master style sheet, 382

reducing, 381

setting font-stack and, 132

size property, background images, 205206, 209

size values, radial gradients, 193

skew(), skewX(), or skew(Y) value, 2D transforms, 314

slash (/), comments, 67

small-caps, 151

small-caption: keyword, 152

small.css, 366367, 370372

smart quotes, 39

spacing

horizontal text alignment, 171173

between table cells, 229

<span> tag, 56

specificity

best practices, 402403, 406

cascade order determined by, 121

hierarchy of CSS rules, 380

stacking order, 288, 294295

Standard Generalized Markup Language (SGML), 19

states

adding transitions between element, 320324

link, 82, 84

styling navigation and link, 339341

using CSS sprites, 342344

static positioning, 288, 290291

status-bar: keyword, 152

stretched images, borders, 275

strict mode, browsers, 363

strikethrough, text, 180

<strong> tag

aligning text vertically, 174

defining font size, 145

as nested tag, 70

redefining in CSS, 8, 5052

styling descendants, 7275

styling siblings, 7881

structural elements

CSS rules, 11

new features in HTML5, 2728

placing before designing, 399

using, 29

structural pseudo-classes, 8283

style sheet strategies

Aggregate method, 384

best practices, 381

Divide and Conquer method, 383

Dynamic method, 385

One for All method, 382

<style> tag

adding embedded styles, 4042

applying media queries, 111

responsive design with media queries, 373

troubleshooting CSS code, 386

styles

browser default, 20

horizontal text alignment, 171172

making text italic, 147148

progressive enhancement honoring user, 355

resetting browser default, 358362

text justification, 173

word processor, 2

word processor vs. CSS, 34

subscript, vertical text alignment, 175

sub-settings, Web font service bureaus, 143

superscript, hyperlinking footnotes, 175

SVG (Scalable Vector Graphics) Web fonts, 20, 135, 139

symbol fonts, 129

syntax

!important declaration, 117118

@media rule, 112

CSS rules, 11

defining styles in HTML tag, 3739

older gradient, 195

T

table of contents (TOC), section headers mimicking, 378379

table properties

collapsing borders between table cells, 230231

getting started, 220222

setting space between table cells, 229

setting table caption position, 233

setting table layout, 228

showing/hiding empty table cells, 232

table value, display property, 253

table-layout property, 228

tables, background color, 197

tags, HTML

adding inline style to, 36

associated with browser inherited styles, 20

CSS files should not contain, 45

defining styles based on attributes of, 100103

HTML document setup, 3031

HTML properties and, 1920

HTML5 in older versions of IE, 3233

HTML5 structure and, 28

redefining, 5052

understanding, 18

<td> tag, 174

technology, Web font service bureaus, 142143

testing

best practices, 405

minified version of CSS code, 398

troubleshooting CSS code, 389

using inline styles, 39

text. See also font properties

adding HTML tags to, 18

controlling overflow, 261

CSS resets for underlining, 359

decorating, 179181

design limitations of, 125

in graphics or Flash vs., 125

multicolumn layout, 278279

new features in CSS3, 14

positioning overlapping, 266

styling for print by avoiding in graphics, 114

wrapping and bullets, 225

text properties

aligning horizontally, 171173

aligning vertically, 174175

coming soon, 181

decorating, 179180

drop shadows, 166170

getting started, 158

indenting paragraphs, 176

overview of, 157

putting it all together, 182

quick reference, 413

setting case, 164165

spacing, 159163

white space control, 177178

text-align property, 171173

text-align-last property, 172

text-decoration property, 179181

text-indent property, 176

text-justify property, 173

text-overflow property, 261

text-shadow property, 166170, 190

text-transform property, 164165

tiled images, borders, 275

titles, small caps for, 151

TOC (table of contents), section headers mimicking, 378379

tracking, 159160

transform properties

2D transformations, 312315

3D transformations, 316319

getting started, 308310

new features in CSS3, 14

overview of, 307

putting it all together, 325326

quick reference, 421

transforming elements, 311

transform property, 311, 313315

transform value, 324

transform-origin keywords, 315

transform-style property, 316319

transition properties

3D transformations, 316319

adding transitions between element states, 320324

getting started, 308310

new features in CSS3, 14

overview of, 307

putting it all together, 325326

quick reference, 422

transition property, 322324

transition-delay values, 323324

transition-duration values, 323324

transition-property value, 323324

transition-timing-function values, 323324

translate(), translateX(), or translate(Y) value, 2D transforms, 314

translate3d() value, 3D transforms, 319

translateZ() value, 3D transforms, 319

transparency

creating border with, 304

setting alpha values for color, 190

styling for print by avoiding color, 114

transparent keyword, 204, 213

triad color-combination scheme, 199

troubleshooting CSS code, 386389

TrueType (TTF) Web font, 134, 138, 140

TTF (TrueType) Web font, 134, 138, 140

type families. See font families

typeface overrides, 132

typography

affecting how text appears, 157

understanding on Web, 125

using Web fonts for. See Web fonts

U

undecorating text, 179180

underlines

differentiating hypertext from text, 340

text decorations, 179180

using border-bottom for text, 359

understudy fonts, 131, 133, 146

universal selector

adding default transitions to, 324

CSS resets using, 360, 362

CSS rules, 10

defining universal styles, 6163

elements styled by, 36

styling descendants universally, 7475

unvisited links, setting appearance, 8687

uppercase, setting text case, 164165

URL

adding multiple background images, 214

changing mouse pointer appearance, 239

defining background image, 206

defining own graphic bullets, 224

setting border image, 275

user interface

designing. See design and interface techniques

inline styles, 39

user interface properties

getting started, 236237

mouse pointer appearance, 238239

overview of, 235

putting it all together, 246

quick reference, 416

UTF-8 (8-bit Unicode Transformation Format) character set, 126, 423428

V

validation, CSS code, 395

values

2D transform, 311, 313315

3D transform, 318319

clip, 298299

color, 185190

content, 241

CSS browser extensions working with, 13

cursor, 238239

defining styles based on tag attributes, 100103

defining styles in HTML tag, 38

display type, 252254

font-stretch, 150

grouped selector changing, 66

indenting paragraphs, 176

letter-spacing, 159160

linear gradient, 191

line-height, 162163

media type, 104

multiple font, 152154

placing at top of CSS code in comments, 6768

position, 292293

radial gradient, 192

specifying units for, 399

structural elements of CSS rules, 11

text decorations, 179180

text transform, 164165

transformations, 311, 316

transitions, 323324

troubleshooting CSS code, 386

vertical text alignment, 174175

word-spacing, 161

vertical alignment

centering numbers in blocks, 336

CSS resets for text, 359

text, 174175

vertical-align property, 174175

viewport

browser, 286

responsive design with media queries, 370372

visibility

clipping element’s area of, 298299

setting element’s, 296297

visibility property, 254, 288

visible keyword, overflow, 260

visited links, setting appearance of, 8687

:visited pseudo-class, 8487

visitor styles, determining cascade order, 120

visual formatting properties

clipping visibility area, 298299

getting started, 284285

opacity, 300301

overview of, 283

position, 292293

positioning type, 288291

putting it all together, 305

quick reference, 420

shadows, 302304

stacking objects in 3D, 294295

visibility, 296297

window and document, 286287

W

W3C (World Wide Web Consortium)

browser specifications for rendering Web code, 5

CSS Validator for CSS code, 395

evolution of CSS under, 67

evolution of HTML5 under, 2425

understanding, 10

Web design. See responsive Web design

Web fonts

converting using Font Squirrel, 140

defining to font stack, 137139

formats, 134135

overview of, 133134

setting better stack font with, 135136

using dingbats as, 129

using for icons, 408

Web-safe fonts, 133

Web forms, 27

Web Inspector, viewing CSS with, 390, 393394

Web Open Font Format (WOFF), 135, 138, 140

Web page

adding embedded styles to, 4042

as document. See documents

Web sites

adding external CSS file to, 4349

for multi-screen strategy, 357

Webdings, 129

Webkit browser extensions, 13

-webkit extension, CSS, 1213

weights, setting bold/bolder/boldest, 149

WFSB (Web font service bureaus), 141143

WHATWG (Web HyperText Application Technology Working Group), HTML5, 2526

white-space property, text, 177178

width

browser windows and documents, 286287

defining element, 255257

of element’s box, 250

fixing older versions of IE, 337338

floating elements in window, 263

media queries and, 104105

multicolumn layouts and, 332333

viewport, 287

width property, 255257

windows, browser, 286287

Windows fonts, online resource, 139

WOFF (Web Open Font Format), 135, 138, 140

word-processor styles, 24

word-spacing property, 161

World Wide Web Consortium. See W3C (World Wide Web Consortium)

wrapped text, bullet positions, 225

X

XHTML, 24, 29

XHTML2, 2426

XHTML5, 26, 29

XML, 2426

Y

Yahoo’s Reset CSS, 361

Yahoo’s YUI Grids framework, 376

Z

z-index property, 294295

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset