xvi
7
Adding a Little Style
getting started with CSS
I was told there’d be CSS in this book.
So far you’ve been
concentrating on learning HTML to create the structure of your web pages. But as
you can see, the browser’s idea of style leaves a lot to be desired. Sure, we could
call the fashion police, but we don’t need to. With CSS, you’re going to completely
control the presentation of your pages, often without even changing your HTML.
Could it really be so easy? Well, you
are
going to have to learn a new language;
after all, Webville is a bilingual town. After reading this chapter’s guide to learning
the language of CSS, you’re going to be able to stand on
either
side of Main Street
and hold a conversation.
Five-Minute
Mystery
You’re not in Kansas anymore
256
Overheard on Webville’s “Trading Spaces”
258
Using
CSS
with
HTML
259
Getting CSS into your HTML
261
Adding style to the lounge
262
Let’s put a line under the welcome message too
265
So, how do selectors really work?
267
Seeing
selectors
visually
270
Getting the Lounge style into the elixirs and directions pages
273
It’s time to talk about your inheritance…
281
Overriding
inheritance
284
Adding an element to the greentea class
287
Creating
a
class
selector
288
Taking
classes
further…
290
The world’s smallest and fastest guide to how styles are applied
292
Exercise
Solutions
303
Dostları ilə paylaş: