Chapter 18
Chapter 18: Ten Great CSS Tips and Tricks ................................................................
In This Chapter
Avoiding changing the default font size
Watching out for invisible borders
Taking care to prevent color clash
Centering redux
Blurring effects
Debugging your scripts
Finding CSS resources
Customizing bullet graphics
Importing graphics from multiple locations
Combining classes
Glazing carrots: a bonus tip
L
otsa tips are scattered throughout this book. But, what the heck! Here
are some more.
Letting Users Control Font Size .................................................................
Try to avoid specifying the bodyfont size. Don’t do this, for example:
body {font-size: 24px;}
I used this code in Chapter 15 and similar code elsewhere throughout this
book. I’m changing the body font size from whatever is set as the default in
the browser to 24 pixels. Don’t do it. People have set their browser’s options
to a text size that’s readable for them. You don’t know whether they’ve got a
pixel resolution of 1680x1050 or 800x600 pixels. It makes a difference. The
user should be the one to decide this issue, not you. Why did I do it in this
book? Because it is a book. At default font sizes, screen shots used for the fig-
ures in this book wouldn’t be readable, so I sometimes boosted the body text
size to make it possible for the readers to see what I’m talking about.