SlideShare a Scribd company logo
CSS: The Definitive Guide, 5th Edition (Early
Release) Eric Meyer download
https://ebookmeta.com/product/css-the-definitive-guide-5th-
edition-early-release-eric-meyer/
Download full version ebook from https://ebookmeta.com
We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!
CSS: The Definitive Guide: Web Layout and Presentation
5th Edition Eric A. Meyer
https://ebookmeta.com/product/css-the-definitive-guide-web-
layout-and-presentation-5th-edition-eric-a-meyer/
CSS: The Definitive Guide Web Layout and Presentation
Eric A. Meyer
https://ebookmeta.com/product/css-the-definitive-guide-web-
layout-and-presentation-eric-a-meyer/
CSS Pocket Reference Visual Presentation for the Web
5th Edition Eric A Meyer
https://ebookmeta.com/product/css-pocket-reference-visual-
presentation-for-the-web-5th-edition-eric-a-meyer/
Finding Forgiveness Discovering the Healing Power of
the Gospel 1st Edition Stanley D. Gale
https://ebookmeta.com/product/finding-forgiveness-discovering-
the-healing-power-of-the-gospel-1st-edition-stanley-d-gale/
The Phantom Coach 1st Edition Ruskin Bond
https://ebookmeta.com/product/the-phantom-coach-1st-edition-
ruskin-bond/
The Science of Psychology, 1st Canadian Edition : An
Appreciative View Laura A. King
https://ebookmeta.com/product/the-science-of-psychology-1st-
canadian-edition-an-appreciative-view-laura-a-king/
Fabulous Peculiarities The Art of Tony Calzetta 1st
Edition Tom Smart
https://ebookmeta.com/product/fabulous-peculiarities-the-art-of-
tony-calzetta-1st-edition-tom-smart/
Jake Hancock Private Investigator Mystery Box Set Books
1 4 Dan Taylor
https://ebookmeta.com/product/jake-hancock-private-investigator-
mystery-box-set-books-1-4-dan-taylor/
True Colors World Masters of Natural Dyes and Pigments
2nd Edition Keith Recker
https://ebookmeta.com/product/true-colors-world-masters-of-
natural-dyes-and-pigments-2nd-edition-keith-recker/
Later Platonists and Their Heirs Among Christians,
Jews, and Muslims 1st Edition Ken Parry
https://ebookmeta.com/product/later-platonists-and-their-heirs-
among-christians-jews-and-muslims-1st-edition-ken-parry/
CSS: The Definitive Guide, 5th Edition (Early Release) Eric Meyer
CSS: The Definitive Guide
FIFTH EDITION
Visual Styling for the Web
With Early Release ebooks, you get books in their earliest form—
the authors’ raw and unedited content as they write—so you can
take advantage of these technologies long before the official
release of these titles.
Eric A. Meyer and Estelle Weyl
CSS: The Definitive Guide
by Eric A. Meyer and Estelle Weyl
Copyright © 2023 Eric Meyer. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles
(http://oreilly.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Acquisitions Editor: Amanda Quinn
Development Editor: Rita Fernando
Production Editor: Elizabeth Faerm
Interior Designer: David Futato
Cover Designer: Karen Montgomery
Illustrator: Kate Dullea
May 2000: First Edition
March 2004: Second Edition
November 2006: Third Edition
November 2017: Fourth Edition
Revision History for the Fifth Edition
2022-07-25: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781449393199 for
release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
CSS: The Definitive Guide, the cover image, and related trade dress
are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to
ensure that the information and instructions contained in this work
are accurate, the publisher and the authors disclaim all responsibility
for errors or omissions, including without limitation responsibility for
damages resulting from the use of or reliance on this work. Use of
the information and instructions contained in this work is at your
own risk. If any code samples or other technology this work contains
or describes is subject to open source licenses or the intellectual
property rights of others, it is your responsibility to ensure that your
use thereof complies with such licenses and/or rights.
978-1-098-11755-9
[TO COME]
Chapter 1. CSS and
Documents
A NOTE FOR EARLY RELEASE READERS
With Early Release ebooks, you get books in their earliest form—
the authors’ raw and unedited content as they write—so you can
take advantage of these technologies long before the official
release of these titles.
This will be the 1st chapter of the final book. Please note that
the GitHub repo will be made active later on.
If you have comments about how we might improve the content
and/or examples in this book, or if you notice missing material
within this chapter, please reach out to the editor at
rfernando@oreilly.com.
Cascading Style Sheets (CSS) is a powerful programming language
that transforms the presentation of a document or a collection of
documents, and it has spread to nearly every corner of the web as
well as many ostensibly non-web environments. For example,
embedded-device displays often use CSS to style their user
interfaces, many RSS clients let you apply CSS to feeds and feed
entries, and some instant message clients use CSS to format chat
windows. Aspects of CSS can be found in the syntax used by
JavaScript frameworks, and even in JavaScript itself. It’s everywhere!
A Brief History of (Web) Style
CSS was first proposed in 1994, just as the web was beginning to
really catch on. At the time, browsers gave all sorts of styling power
to the user—the presentation preferences in Mosaic, for example,
permitted font family, size, and color to be defined by the user on a
per-element basis. None of this was available to document authors;
all they could do was mark a piece of content as a paragraph, as a
heading of some level, as preformatted text, or one of a dozen other
element types. If a user configured their browser to make all level-
one headings tiny and pink and all level-six headings huge and red,
well, that was their lookout.
It was into this milieu that CSS was introduced. Its goal was to
provide a simple, declarative styling language that was flexible for
authors and, most importantly, provided styling power to authors
and users alike. By means of the “cascade,” these styles could be
combined and prioritized so that both authors and readers had a say
—though readers always had the last say.
Work quickly advanced, and by late 1996, CSS1 was finished. While
the newly established CSS Working Group moved forward with CSS2,
browsers struggled to implement CSS1 in an interoperable way.
Although each piece of CSS was fairly simple on its own, the
combination of those pieces created some surprisingly complex
behaviors. There were also some unfortunate missteps in early
implementations, such as the infamous discrepancy in box model
implementations. These problems threatened to derail CSS
altogether, but fortunately some clever proposals were implemented,
and browsers began to harmonize. Within a few years, thanks to
increasing interoperability and high-profile developments such as the
CSS-based redesign of Wired magazine and the CSS Zen Garden,
CSS began to catch on.
Before all that happened, though, the CSS Working Group had
finalized the CSS2 specification in early 1998. Once CSS2 was
finished, work immediately began on CSS3, as well as a clarified
version of CSS2 called CSS2.1. In keeping with the spirit of the
times, CSS3 was constructed as a series of (theoretically) standalone
modules instead of a single monolithic specification. This approach
reflected the then-active XHTML specification, which was split into
modules for similar reasons.
The rationale for modularizing CSS3 was that each module could be
worked on at its own pace, and particularly critical (or popular)
modules could be advanced along the W3C’s progress track without
being held up by others. Indeed, this has turned out to be the case.
By early 2012, three CSS3 modules (along with CSS1 and CSS 2.1)
had reached full Recommendation status—CSS Color Level 3, CSS
Namespaces, and Selectors Level 3. At that same time, seven
modules were at Candidate Recommendation status, and several
dozen others were in various stages of Working Draft-ness. Under
the old approach, colors, selectors, and namespaces would have had
to wait for every other part of the specification to be done or cut
before they could be part of a completed specification. Thanks to
modularization, they didn’t have to wait.
The flip side of that advantage is that it’s hard to speak of a single
“CSS3 specification.” There isn’t any such thing, nor can there be.
Even if every other CSS module had reached level 3 by, say, late
2016 (they didn’t), there was already a Selectors Level 4 in process.
Would we then speak of it as CSS4? What about all the “CSS3”
features still coming into play? Or Grid Layout, which had not then
even reached Level 1? That’s why this book is a definitive guide for
“CSS” as a whole — because there really is no such thing as CSS3.
So while we can’t really point to a single tome and say, “There is
CSS3,” we can talk of features by the module name under which
they are introduced. The flexibility permitted by modules more than
makes up for the semantic awkwardness they sometimes create. (If
you want something approximating a single monolithic specification,
the CSS Working Group publishes yearly “Snapshot” documents.)
With that established, we’re ready to start understanding CSS. Let’s
start by covering the basics of what goes inside a stylesheet.
Stylesheet Contents
Inside a stylesheet, you’ll find a number of rules which are
comprised of selectors and declaration blocks, the latter of which are
made up of one or more declarations that are themselves made up
of property and value combinations. All put together, they look a
little something like this:
h1 {color: maroon;}
body {background: yellow;}
Styles such as these comprise the bulk of any stylesheet—simple or
complex, short or long. But which parts are which, and what do they
represent?
Rule Structure
To illustrate the concept of rules in more detail, let’s break down the
structure.
Each rule has two fundamental parts: the selector and the
declaration block. The declaration block is composed of one or more
declarations, and each declaration is a pairing of a property and a
value. Every stylesheet is made up of a series of rules. Figure 1-1
shows the parts of a rule.
Figure 1-1. The structure of a rule
The selector, shown on the left side of the rule, defines which piece
of the document will be selected for styling. In Figure 1-1, h1
(heading level 1) elements are selected. If the selector were p, then
all p (paragraph) elements would be selected.
The right side of the rule contains the declaration block, which is
made up of one or more declarations. Each declaration is a
combination of a CSS property and a value of that property. In
Figure 1-1, the declaration block contains two declarations. The first
states that this rule will cause parts of the document to have a
color of red, and the second states that part of the document will
have a background of yellow. So, all of the h1 elements in the
document (defined by the selector) will be styled in red text with a
yellow background.
Vendor prefixing
Sometimes you’ll see pieces of CSS with dashes and labels in front of
them, like this: -o-border-image. These are called vendor
prefixes, and are a way for browser vendors to mark properties,
values, or other bits of CSS as being experimental or proprietary (or
both). As of early 2022, there were a few vendor prefixes in the
wild, with the most common being shown in Table 1-1.
T
a
bl
e
1
-
1
.
S
o
m
e
c
o
m
m
o
n
v
e
n
d
o
r
p
r
e
fi
x
e
s
Prefix Vendor
-epub- International Digital Publishing Forum ePub format
-moz- Mozilla-based browsers (e.g., Firefox)
-ms- Microsoft Internet Explorer
-o- Opera-based browsers
-webkit- WebKit-based browsers (e.g., Safari and Chrome)
As Table 1-1 implies, the generally accepted format of a vendor
prefix is a dash, a label, and a dash, although a few prefixes
erroneously omit the first dash.
The uses and abuses of vendor prefixes are long, tortuous, and
beyond the scope of this book. Suffice to say that they started out
as a way for vendors to test out new features, thus helping speed
interoperability without worrying about being locked into legacy
behaviors that were incompatible with other browsers. This avoided
a whole class of problems that nearly strangled CSS in its infancy.
Unfortunately, prefixed properties were then publicly deployed by
web authors and ended up causing a whole new class of problems.
As of early 2022, vendor-prefixed CSS features are nearly non-
existent, with old prefixed properties and values being slowly but
steadily removed from browser implementations. It’s quite likely that
you’ll never write prefixed CSS, but you may encounter it in the wild,
or inherit it in a legacy codebase. Here’s an example:
-webkit-transform-origin: 0 0;
-moz-transform-origin: 0 0;
-o-transform-origin: 0 0;
transform-origin: 0 0;
That’s saying the same thing four times: once each for the WebKit,
Mozilla (Firefox), and Opera browser lines, and then finally the CSS-
standard way. Again, this is no longer really necessary. We’re only
including it here to give you an idea of what it might look like,
should you come across this in the future.
Whitespace Handling
CSS is basically insensitive to whitespace between rules, and largely
insensitive to whitespace within rules, although there are a few
exceptions.
In general, CSS treats whitespace just like HTML does: any sequence
of whitespace characters is collapsed to a single space for parsing
purposes. Thus, you can format the hypothetical rainbow rule in
the following ways:
rainbow: infrared red orange yellow green blue indigo
violet ultraviolet;
rainbow:
infrared red orange yellow green blue indigo
violet ultraviolet;
rainbow:
infrared
red
orange
yellow
green
blue
indigo
violet
ultraviolet
;
…as well as any other separation patterns you can think up. The
only restriction is that the separating characters be whitespace: an
empty space, a tab, or a newline, alone or in combination, as many
as you like.
Similarly, you can format series of rules with whitespace in any
fashion you like. These are just five examples out of an effectively
infinite number of possibilities:
html{color:black;}
body {background: white;}
p {
color: gray;}
h2 {
color : silver ;
}
ol
{
color
:
silver
;
}
As you can see from the first rule, whitespace can be largely
omitted. Indeed, this is usually the case with minified CSS, which is
CSS that’s had every last possible bit of extraneous whitespace
removed, usually by an automated server-side script of some sort.
The rules after the first two use progressively more extravagant
amounts of whitespace until, in the last rule, pretty much everything
that can be separated onto its own line has been.
All of these approaches are valid, so you should pick the formatting
that makes the most sense—that is, is easiest to read—in your eyes,
and stick with it.
CSS Comments
CSS does allow for comments. These are very similar to C/C++
comments in that they are surrounded by /* and */:
/* This is a CSS1 comment */
Comments can span multiple lines, just as in C++:
/* This is a CSS1 comment, and it
can be several lines long without
any problem whatsoever. */
It’s important to remember that CSS comments cannot be nested.
So, for example, this would not be correct:
/* This is a comment, in which we find
another comment, which is WRONG
/* Another comment */
and back to the first comment */
WARNING
One way to create “nested” comments accidentally is to temporarily comment
out a large block of a stylesheet that already contains a comment. Since CSS
doesn’t permit nested comments, the “outside” comment will end where the
“inside” comment ends.
Unfortunately, there is no “rest of the line” comment pattern such as
// or # (the latter of which is reserved for ID selectors anyway).
The only comment pattern in CSS is /* */. Therefore,
if you wish to place comments on the same line as markup, then you
need to be careful about how you place them. For example, this is
the correct way to do it:
h1 {color: gray;} /* This CSS comment is several lines */
h2 {color: silver;} /* long, but since it is alongside */
p {color: white;} /* actual styles, each line needs to */
pre {color: gray;} /* be wrapped in comment markers. */
Given this example, if each line isn’t marked off, then most of the
stylesheet will become part of the comment and thus will not work:
h1 {color: gray;} /* This CSS comment is several lines
h2 {color: silver;} long, but since it is not wrapped
p {color: white;} in comment markers, the last three
pre {color: gray;} styles are part of the comment. */
In this example, only the first rule (h1 {color: gray;}) will be
applied to the document. The rest of the rules, as part of the
comment, are ignored by the browser’s rendering engine.
NOTE
CSS comments are treated by the CSS parser as if they do not exist at all, and
so do not count as whitespace for parsing purposes. This means you can put
them into the middle of rules—even right inside declarations!
Markup
There is no markup in stylesheets. This might seem obvious, but
you’d be surprised. The one exception is HTML comment markup,
which is permitted inside style elements for historical reasons:
<style><!--
h1 {color: maroon;}
body {background: yellow;}
--></style>
That’s it, and even that isn’t recommended any more — the
browsers that needed it have faded into near-oblivion.
Speaking of markup, it’s time to take a very slight detour to talk
about the elements that our CSS will be used to style, and how
those can be affected by CSS in the most fundamental ways.
Another Random Document on
Scribd Without Any Related Topics
{248}
When the king did see how Robin did flee,
He was vexed wondrous sore ;
With a hoop and a hallow he vowed to follow,
And take him, or never give ore.
Come now let’s away, then crys Little John,
Let any man follow that dare ;
To Carlisle we’l hye, with our company,
And so then to Lancastèr.
From Lancaster then to Chester they went,
And so did king Henry ;
But Robin [went] away, for he durst not stay,
For fear of some treachery.
Says Robin, Come let us for London goe,
To see our noble queens face,
It may be she wants our company,
Which makes the king so us chase.
When Robin he came queene Katherin before,
He fell low upon his knee :
“If it please your grace, I am come to this place
For to speak with king Henry.”
Queen Katherine answered bold Robin
310
again,
The king is gone to merry Sherwood ;
And when he went away to me he did say,
He would go and seek Robin Hood.
“Then fare you well, my gracious queen,
For to Sherwood I will hye apace ;
For fain would I see what he would with me,
If I could but meet with his grace.”
But when king Henry he came home,
Full weary, and vexed in mind,
And that he did hear Robin had been there,
He blamed dame Fortune unkind.
You’re welcome home, ‘queen’ Katherin cryed,
Henry, my soveraign liege ;
Bold Robin Hood, that archer good,
Your person hath been to seek.
But when king Henry he did ‘hear,’
That Robin had been there him to seeke,
This answer he gave, He’s a cunning knave,
For I have sought him this whole three weeks.
A boon ! a boon ! ‘queen’ Katherin cry’d,
I beg it here ‘of’ your grace,
To pardon his life, and seek not strife :
And so endeth Robin Hoods chase.
XIV.
ROBIN HOOD’S GOLDEN PRIZE.
“He met two priests upon the way,
And forced them with him to pray;
For gold they prayed, and gold they had,
Enough to make bold Robin glad;
His share came to four hundred pound,
That then was told upon the ground.
Now mark, and you shall hear the jest,
You never heard the like exprest.
Tune is, Robin Hood was a tall young man, &c.”
This ballad (given from an old black letter copy in the collection of
Anthony a Wood) was entered (amongst others) in the Stationers’ book, by
Francis Coule, 13th June 1631, and by Francis Grove, 2d June 1656.
{250}
I have heard talk of Robin Hood,
Derry, derry down,
And of brave Little John,
Of fryer Tuck, and Will Scarlèt,
Loxley, and maid Mariòn.
But such a tale as this before
I think was never knone :
For Robin Hood disguised himself,
And ‘from’ 311
the wood is gone.
Like to a fryer bold Robin Hood
Was accoutered in his array ;
With hood, gown, beeds, and crucifix,
He past upon the way.
He had not gone miles two or three,
But it was his chance to spy
Two lusty priests, clad all in black,
Come riding gallantly.
Benedicite, then said Robin Hood,
Some pitty on me take ;
Cross you my hand with a silver groat,
For our dear ladies sake.
For I have been wandring all this day,
And nothing could I get ;
Not so much as one poor cup of drink,
Nor bit of bread to eat.
{251}
{252}
Now, by our holy dame, the priests repli’d,
We never a peny have ;
For we this morning have been rob’d,
And could no money save.
I am much afraid, said bold Robin Hood,
That you both do tell a lie ;
And now before you do go hence,
I am resolv’d to try.
When as the priests heard him say so,
Then they rode away amain ;
But Robin Hood betook to his heels,
And soon overtook them again.
Then Robin Hood laid hold of them both,
And pull’d them down from their horse :
O spare us, fryer ! the priests cry’d out,
On us have some remorse !
You said you had no mony, quoth he,
Wherefore, without delay,
We three will fall down on our knees,
And for mony we will pray.
The priests they could not him gainsay,
But down they kneeled with speed :
Send us, O send us, then quoth they,
Some mony to serve our need.
The priests did pray with a mournful chear,
Sometimes their hands did wring ;
Sometimes they wept, and cried aloud,
Whilst Robin did merrily sing.
When they had been praying an hours space,
The priests did still lament ;
Then quoth bold Robin, Now let’s see
What mony heaven hath us sent.
We will be sharers all alike
Of [the] mony that we have ;
And there is never a one of us
That his fellow shall deceive.
The priests their hands in their pockets put,
But mony would find none :
We’l search ourselves, said Robin Hood,
Each other, one by one.
Then Robin
312
took pains to search them both,
And he found good store of gold,
Five hundred peeces presently
Upon the grass was told.
Here is a brave show, said Robin Hood,
Such store of gold to see,
And you shall each one have a part,
Cause you prayed so heartily.
He gave them fifty pounds a-peece,
And the rest for himself did keep :
The priests [they] durst not speak one word,
But they sighed wondrous deep.
ROBIN HOOD AND THE FRIARS.
{253}
ROBIN HOOD AND THE FRIARS.
With that the priests rose up from their knees,
Thinking to have parted so :
Nay, nay, says Robin Hood, one thing more
I have to say ere you go.
You shall be sworn, said bold Robin Hood,
Upon this holy grass,
That you will never tell lies again,
Which way soever you pass.
The second oath that you here must take,
That all the days of your lives,
You shall never tempt maids to sin,
Nor lie with other mens wives.
The last oath you shall take, it is this,
Be charitable to the poor ;
Say, you have met with a holy fryar,
And I desire no more.
He set them on their horses again,
And away then they did ride ;
And he return’d to the merry green-wood,
With great joy, mirth, and pride.
XV.
ROBIN HOOD’S RESCUING WILL STUTLY.
From an old black letter copy in the collection of Anthony a Wood. The full
title is: “Robin Hood his rescuing Will Stutly from the sheriff and his men,
who had taken him prisoner, and was going to hang him. To the tune of
Robin Hood and Queen Katherine.” 313
{255}
When Robin Hood in the green wood liv’d,
Derry, derry down,
Under the green wood tree,
Tidings there came to him with speed,
Tidings for certainty ;
Hey down, derry, derry down ;
That Will Stutly surprized was,
And eke in prison lay ;
Three varlets that the sheriff had hired,
Did likely him betray :
“I, and to-morrow hanged must be,
To-morrow as soon as it is day ;
Before they could this victory get,
Two of them did Stutly slay.”
When Robin Hood he heard this news,
Lord ! he was grieved sore ;
And to his merry men he did say,
(Who altogether swore),
That Will Stutly should rescued be,
And be brought ‘back’ again ;
Or else should many a gallant wight
For his sake there be slain.
He cloathed himself in scarlet ‘red,’
His men were all in green ;
A finer shew, throughout the world,
In no place could be seen.
{256}
{257}
Good lord ! it was a gallant sight
To see them all on a row ;
With every man a good broad sword,
And eke a good yew bow.
Forth of the green wood are they gone,
Yea all couragiously,
Resolving to bring Stutly home,
Or every man to die.
And when they came the castle neer,
Whereas Will Stutly lay,
I hold it good, saith Robin Hood,
Wee here in ambush stay,
And send one forth some news to hear,
To yonder palmer fair,
That stands under the castle wall,
Some news he may declare.
With that steps forth a brave young man,
Which was of courage bold,
Thus did hee speak to the old man :
I pray thee, palmer old,
Tell me, if that thou rightly ken,
When must Will Stutly die,
Who is one of bold Robin’s men,
And here doth prisoner lie ?
Alack ! alass ! the palmer said,
And for ever wo is me !
Will Stutly hanged must be this day,
On yonder gallows-tree.
{258}
O had his noble master known,
He would some succour send ;
A few of his bold yeomandree
Full soon would fetch him hence.
I, that is true, the young man said ;
I, that is true, said he ;
Or, if they were neer to this place,
They soon would set him free.
But fare ‘thee’ well, thou good old man,
Farewell, and thanks to thee ;
If Stutly hanged be this day,
Reveng’d his death will be.
Hee was no sooner from the palmer gone,
But the gates ‘were’ open’d wide,
And out of the castle Will Stutly came,
Guarded on every side.
When hee was forth of the castle come,
And saw no help was nigh,
Thus he did say to the sherìff,
Thus he said gallantly :
Now seeing that I needs must die,
Grant me one boon, said he,
For my noble master nere had a man,
That yet was hang’d on the tree.
Give me a sword all in my hand,
And let mee be unbound,
And with thee and thy men Ile fight,
Till I lie dead on the ground.
{259}
But his desire he would not grant,
His wishes were in vain ;
For the sheriff had sworn he hanged should be,
And not by the sword be slain.
Do but unbind my hands, he saies,
I will no weapons crave,
And if I hanged be this day,
Damnation let me have.
O no, O no, the sheriff said,
Thou shalt on the gallows die,
I, and so shall thy master too,
If ever in me it lie.
O, dastard coward ! Stutly cries,
Thou faint-heart pesant slave !
If ever my master do thee meet,
Thou shalt thy paiment have.
My noble master ‘doth thee’ scorn,
And all thy ‘coward’ crew ;
Such silly imps unable are,
Bold Robin to subdue.
But when he was to the gallows come,
And ready to bid adiew,
Out of a bush leaps Little John,
And comes Will Stutly ‘to’ :
“I pray thee, Will, before thou die,
Of thy dear friends take leave :—
I needs must borrow him for a while,
How say you, master ‘shrieve’ ?”
{260}
Now, as I live, the sheriff he said,
That varlet will I know ;
Some sturdy rebell is that same,
Therefore let him not go.
Then Little John most hastily,
Away cut Stutly’s bands,
And from one of the ‘sheriffs’ men,
A sword twicht from his hands.
“Here, Will, here, take thou this same,
Thou canst it better sway ;
And here defend thyself awhile,
For aid will come straightway.”
And there they turn’d them back to back,
In the middle of them that day,
Till Robin Hood approached near,
With many an archer gay.
With that an arrow by them flew,
I wist from Robin Hood ;
Make haste, make haste, the sheriff he said,
Make haste, for it is good.
The sheriff is gon, his ‘doughty’ 314
men
Thought it no boot to stay,
But, as their master had them taught,
‘They’ run full fast away.
O stay, O stay, Will Stutly said,
Take leave ere you depart ;
You neere will catch bold Robin Hood,
Unless you dare him meet.
{261}
O ill betide you, quoth Robin Hood,
That you so soon are gone ;
My sword may in the scabbord rest,
For here our work is done.
I little thought, ‘Will Stutly said,’ 315
When I came to this place,
For to have met with Little John,
Or seen my masters face.
Thus Stutly was at liberty set,
And safe brought from his foe :
“O thanks, O thanks to my mastèr,
Since here it was not so :
And once again, my fellows [all],
We shall in the green woods meet,
Where we [will] make our bow-strings twang,
Musick for us most sweet.”
CSS: The Definitive Guide, 5th Edition (Early Release) Eric Meyer
XVI.
THE NOBLE FISHER-MAN;
OR,
ROBIN HOOD’S PREFERMENT:
“Shewing how he won a prize on the sea, and how he gave the one
halfe to his dame, and the other to the building of almes-houses. The tune
is, In summer time, &c.”
From three old black letter copies, one in the collection of Anthony a
Wood, another in the British Museum, and the third in a private collection.
{263}
{264}
In summer-time, when leaves grow green,
When they doe grow both green and long,—
Of a bold outlaw, call’d Robin Hood,
It is of him I sing this song,—
When the lilly leafe, and the ‘eglantine,’
Doth bud and spring with a merry cheere,
This outlaw was weary of the wood-side,
And chasing of the fallow-deere.
“The fisher-men brave more mony have
Than any merchants two or three ;
Therefore I will to Scarborough go,
That I a fisherman brave may be.”
This outlaw called his merry men all,
As they sate under the green-wood tree :
“If any of you have gold to spend,
I pray you heartily spend it with me.”
Now, quoth Robin Hood, Ile to Scarborough go,
It seems to be a very faire day.
‘He’ tooke up his inne at a widdow-womans house,
Hard by upon the water gray :
Who asked of him, Where wert thou borne ?
Or tell to me where dost thou fare ?
I am a poor fisherman, said he then,
This day intrapped all in care.
“What is thy name, thou fine fellòw,
I pray thee heartily tell it to mee ?”
“In my own country, where I was borne,
Men call me Simon over the Lee.”
{265}
Simon, Simon, said the good-wife,
I wish thou mayest well brook thy name.
The out-law was ware of her courtesie,
And rejoyced he had got such a dame.
“Simon, wilt thou be my man ?
And good round wages Ile give thee ;
I have as good a ship of my own,
As any sails upon the sea :
Anchors and planks thou shalt not want,
Masts and ropes that are so long.”
And if you thus do furnish me,
Said Simon, nothing shall goe wrong.
They pluckt up anchor, and away did sayle,
More of a day then two or three ;
When others cast in their baited hooks,
The bare lines into the sea cast he.
It will be long, said the master then,
Ere this great lubber do thrive on the sea ;
I’le assure you he shall have no part of our fish,
For in truth he is no part worthy.
O woe is me ! said Simon then,
This day that ever I came here !
I wish I were in Plompton parke,
In chasing of the fallow deere.
For every clowne laughs me to scorne,
And they by me set nought at all ;
If I had them in Plompton park,
I would set as little by them all.
{266}
They pluckt up anchor, and away did sayle,
More of a day then two or three :
But Simon espyed a ship of warre,
That sayled towards them most valorously.
O woe is me ! said the master then,
This day that ever I was borne !
For all our fish we have got to day,
Is every bit lost and forlorne.
For your French robbers on the sea,
They will not spare of us one man,
But carry us to the coast of France,
And ligge us in the prison strong.
But Simon said, Doe not feare them,
Neither, mastèr, take you no care ;
Give me my bent bow in my hand,
And never a Frenchman will I spare.
“Hold thy peace, thou long lubbèr,
For thou art nought but brags and boast ;
If I should cast thee over-board,
There’s but a simple lubber lost.”
Simon grew angry at these words,
And so angry then was he,
That he took his bent bow in his hand,
And in the ship-hatch goe doth he.
Master, tye me to the mast, saith he,
That at my mark I may stand fair,
And give me my bent bow in my hand,
And never a Frenchman will I spare.
{267}
He drew his arrow to the very head,
And drew it with all might and maine,
And straightway in the twinkling of an eye,
‘To’ the Frenchmans heart the ‘arrow’s gane.’
316
The Frenchman fell down on the ship-hatch,
And under the hatches ‘there’ below ;
Another Frenchman, that him espy’d,
The dead corpse into the sea doth throw.
O master, loose me from the mast, he said,
And for them all take you no care ;
For give me my bent bow in my hand,
And never a Frenchman will I spare.
Then streight [they] boarded the French ship,
They lyeing all dead in their sight ;
They found within ‘that’ ship of warre,
Twelve thousand pound of mony bright.
The one halfe of the ship, said Simon then,
Ile give to my dame and [her] children small ;
The other halfe of the ship Ile bestow
On you that are my fellowes all.
But now bespake the master then,
For so, Simon, it shall not be,
For you have won it with your own hand,
And the owner of it you shall bee.
“It shall be so, as I have said ;
And, with this gold, for the opprest
An habitation I will build,
Where they shall live in peace and rest.”
CSS: The Definitive Guide, 5th Edition (Early Release) Eric Meyer
{269}
XVII.
ROBIN HOOD’S DELIGHT:
“Or, a merry combat fought between Robin Hood, Little John, and Will
Scarelock, and three stout Keepers in Sheerwood Forrest.
Robin was valiant and stout,
So was Scarelock and John in the field,
But these Keepers stout did give them rout,
And made them all for to yield.
But after the battel ended was,
Bold Robin did make them amends,
For claret and sack they did not lack,
So drank themselves good friends.
To the tune of, Robin Hood and Queen Katherine; or, Robin Hood and
the Shepheard.”
From an old black letter copy in the collection of Anthony a Wood.
{270}
There’s some will talk of lords and knights,
Doun, a doun, a doun,
And some of yeomen good ;
But I will tell you of Will Scarlòck,
Little John, and Robin Hood.
Doun, a doun, a doun, a doun.
They were outlaws, ’tis well known,
And men of a noble blood ;
And many a time was their valour shown
In the forrest of merry Sheerwood.
Upon a time it chanced so,
As Robin
317
would have it be,
They all three would a walking go,
The pastime for to see.
And as they walked the forest along,
Upon a Midsummer day,
There was they aware of three keepèrs,
Clad all in green aray.
With brave long faucheons by their sides
And forrest-bills in hand,
They call’d aloud to those bold outlàws,
And charged them to stand.
Why, who are you, cry’d bold Robìn,
That ‘speak’ so boldly here ?
“We three belong to King Henry,
And are keepers of his deer.”

More Related Content

PDF
Download full ebook of Css3 For Web Designers 1st Dan Cederholm instant downl...
PPT
CSS3 and a brief introduction to Google Maps API v3
PPTX
Introduction to CSS
PDF
The CSS Handbook
PPT
Cascading Into ss3
PPTX
intro_To_HTML_and__CSS_using_presentation.pptx
PDF
CSS: a rapidly changing world
DOCX
Web Development Training Report.docx
Download full ebook of Css3 For Web Designers 1st Dan Cederholm instant downl...
CSS3 and a brief introduction to Google Maps API v3
Introduction to CSS
The CSS Handbook
Cascading Into ss3
intro_To_HTML_and__CSS_using_presentation.pptx
CSS: a rapidly changing world
Web Development Training Report.docx

Similar to CSS: The Definitive Guide, 5th Edition (Early Release) Eric Meyer (20)

PPTX
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
PDF
Discover the Top 23 CSS Frameworks for 2023.pdf
PPTX
Presentation 1 [autosaved]
PPTX
Sass:-Syntactically Awesome Stylesheet by Shafeeq
PPTX
Rock Solid CSS Architecture
PDF
Evolution of CSS
PPTX
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
PDF
Introduction to css
PPTX
Bliblidotcom - SASS Introduction
PDF
Compass n Sass
PDF
Download full ebook of Professional Css3 Sikora Piotr instant download pdf
PDF
Design and CSS
PDF
Knowing it all
PDF
Css tools and methodologies
PDF
Get Started With Tailwind React and Create Beautiful Apps.pdf
PDF
Responsive Web Design with HTML5 and CSS3 Second Edition Ben Frain
PPT
UNIT 3.ppt
PDF
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
PDF
A Complete Guide to Frontend - UI Developer
PDF
Web designtrends 1wd
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
Discover the Top 23 CSS Frameworks for 2023.pdf
Presentation 1 [autosaved]
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Rock Solid CSS Architecture
Evolution of CSS
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
Introduction to css
Bliblidotcom - SASS Introduction
Compass n Sass
Download full ebook of Professional Css3 Sikora Piotr instant download pdf
Design and CSS
Knowing it all
Css tools and methodologies
Get Started With Tailwind React and Create Beautiful Apps.pdf
Responsive Web Design with HTML5 and CSS3 Second Edition Ben Frain
UNIT 3.ppt
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
A Complete Guide to Frontend - UI Developer
Web designtrends 1wd
Ad

Recently uploaded (20)

PDF
TR - Agricultural Crops Production NC III.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Business Ethics Teaching Materials for college
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
RMMM.pdf make it easy to upload and study
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Basic Mud Logging Guide for educational purpose
PDF
Pre independence Education in Inndia.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
TR - Agricultural Crops Production NC III.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
O5-L3 Freight Transport Ops (International) V1.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Business Ethics Teaching Materials for college
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
O7-L3 Supply Chain Operations - ICLT Program
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
RMMM.pdf make it easy to upload and study
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Basic Mud Logging Guide for educational purpose
Pre independence Education in Inndia.pdf
human mycosis Human fungal infections are called human mycosis..pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Ad

CSS: The Definitive Guide, 5th Edition (Early Release) Eric Meyer

  • 1. CSS: The Definitive Guide, 5th Edition (Early Release) Eric Meyer download https://ebookmeta.com/product/css-the-definitive-guide-5th- edition-early-release-eric-meyer/ Download full version ebook from https://ebookmeta.com
  • 2. We believe these products will be a great fit for you. Click the link to download now, or visit ebookmeta.com to discover even more! CSS: The Definitive Guide: Web Layout and Presentation 5th Edition Eric A. Meyer https://ebookmeta.com/product/css-the-definitive-guide-web- layout-and-presentation-5th-edition-eric-a-meyer/ CSS: The Definitive Guide Web Layout and Presentation Eric A. Meyer https://ebookmeta.com/product/css-the-definitive-guide-web- layout-and-presentation-eric-a-meyer/ CSS Pocket Reference Visual Presentation for the Web 5th Edition Eric A Meyer https://ebookmeta.com/product/css-pocket-reference-visual- presentation-for-the-web-5th-edition-eric-a-meyer/ Finding Forgiveness Discovering the Healing Power of the Gospel 1st Edition Stanley D. Gale https://ebookmeta.com/product/finding-forgiveness-discovering- the-healing-power-of-the-gospel-1st-edition-stanley-d-gale/
  • 3. The Phantom Coach 1st Edition Ruskin Bond https://ebookmeta.com/product/the-phantom-coach-1st-edition- ruskin-bond/ The Science of Psychology, 1st Canadian Edition : An Appreciative View Laura A. King https://ebookmeta.com/product/the-science-of-psychology-1st- canadian-edition-an-appreciative-view-laura-a-king/ Fabulous Peculiarities The Art of Tony Calzetta 1st Edition Tom Smart https://ebookmeta.com/product/fabulous-peculiarities-the-art-of- tony-calzetta-1st-edition-tom-smart/ Jake Hancock Private Investigator Mystery Box Set Books 1 4 Dan Taylor https://ebookmeta.com/product/jake-hancock-private-investigator- mystery-box-set-books-1-4-dan-taylor/ True Colors World Masters of Natural Dyes and Pigments 2nd Edition Keith Recker https://ebookmeta.com/product/true-colors-world-masters-of- natural-dyes-and-pigments-2nd-edition-keith-recker/
  • 4. Later Platonists and Their Heirs Among Christians, Jews, and Muslims 1st Edition Ken Parry https://ebookmeta.com/product/later-platonists-and-their-heirs- among-christians-jews-and-muslims-1st-edition-ken-parry/
  • 6. CSS: The Definitive Guide FIFTH EDITION Visual Styling for the Web With Early Release ebooks, you get books in their earliest form— the authors’ raw and unedited content as they write—so you can take advantage of these technologies long before the official release of these titles. Eric A. Meyer and Estelle Weyl
  • 7. CSS: The Definitive Guide by Eric A. Meyer and Estelle Weyl Copyright © 2023 Eric Meyer. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com. Acquisitions Editor: Amanda Quinn Development Editor: Rita Fernando Production Editor: Elizabeth Faerm Interior Designer: David Futato Cover Designer: Karen Montgomery Illustrator: Kate Dullea May 2000: First Edition March 2004: Second Edition November 2006: Third Edition November 2017: Fourth Edition Revision History for the Fifth Edition 2022-07-25: First Release
  • 8. See http://oreilly.com/catalog/errata.csp?isbn=9781449393199 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. CSS: The Definitive Guide, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights. 978-1-098-11755-9 [TO COME]
  • 9. Chapter 1. CSS and Documents A NOTE FOR EARLY RELEASE READERS With Early Release ebooks, you get books in their earliest form— the authors’ raw and unedited content as they write—so you can take advantage of these technologies long before the official release of these titles. This will be the 1st chapter of the final book. Please note that the GitHub repo will be made active later on. If you have comments about how we might improve the content and/or examples in this book, or if you notice missing material within this chapter, please reach out to the editor at rfernando@oreilly.com. Cascading Style Sheets (CSS) is a powerful programming language that transforms the presentation of a document or a collection of documents, and it has spread to nearly every corner of the web as well as many ostensibly non-web environments. For example, embedded-device displays often use CSS to style their user interfaces, many RSS clients let you apply CSS to feeds and feed entries, and some instant message clients use CSS to format chat windows. Aspects of CSS can be found in the syntax used by JavaScript frameworks, and even in JavaScript itself. It’s everywhere! A Brief History of (Web) Style CSS was first proposed in 1994, just as the web was beginning to really catch on. At the time, browsers gave all sorts of styling power
  • 10. to the user—the presentation preferences in Mosaic, for example, permitted font family, size, and color to be defined by the user on a per-element basis. None of this was available to document authors; all they could do was mark a piece of content as a paragraph, as a heading of some level, as preformatted text, or one of a dozen other element types. If a user configured their browser to make all level- one headings tiny and pink and all level-six headings huge and red, well, that was their lookout. It was into this milieu that CSS was introduced. Its goal was to provide a simple, declarative styling language that was flexible for authors and, most importantly, provided styling power to authors and users alike. By means of the “cascade,” these styles could be combined and prioritized so that both authors and readers had a say —though readers always had the last say. Work quickly advanced, and by late 1996, CSS1 was finished. While the newly established CSS Working Group moved forward with CSS2, browsers struggled to implement CSS1 in an interoperable way. Although each piece of CSS was fairly simple on its own, the combination of those pieces created some surprisingly complex behaviors. There were also some unfortunate missteps in early implementations, such as the infamous discrepancy in box model implementations. These problems threatened to derail CSS altogether, but fortunately some clever proposals were implemented, and browsers began to harmonize. Within a few years, thanks to increasing interoperability and high-profile developments such as the CSS-based redesign of Wired magazine and the CSS Zen Garden, CSS began to catch on. Before all that happened, though, the CSS Working Group had finalized the CSS2 specification in early 1998. Once CSS2 was finished, work immediately began on CSS3, as well as a clarified version of CSS2 called CSS2.1. In keeping with the spirit of the times, CSS3 was constructed as a series of (theoretically) standalone modules instead of a single monolithic specification. This approach
  • 11. reflected the then-active XHTML specification, which was split into modules for similar reasons. The rationale for modularizing CSS3 was that each module could be worked on at its own pace, and particularly critical (or popular) modules could be advanced along the W3C’s progress track without being held up by others. Indeed, this has turned out to be the case. By early 2012, three CSS3 modules (along with CSS1 and CSS 2.1) had reached full Recommendation status—CSS Color Level 3, CSS Namespaces, and Selectors Level 3. At that same time, seven modules were at Candidate Recommendation status, and several dozen others were in various stages of Working Draft-ness. Under the old approach, colors, selectors, and namespaces would have had to wait for every other part of the specification to be done or cut before they could be part of a completed specification. Thanks to modularization, they didn’t have to wait. The flip side of that advantage is that it’s hard to speak of a single “CSS3 specification.” There isn’t any such thing, nor can there be. Even if every other CSS module had reached level 3 by, say, late 2016 (they didn’t), there was already a Selectors Level 4 in process. Would we then speak of it as CSS4? What about all the “CSS3” features still coming into play? Or Grid Layout, which had not then even reached Level 1? That’s why this book is a definitive guide for “CSS” as a whole — because there really is no such thing as CSS3. So while we can’t really point to a single tome and say, “There is CSS3,” we can talk of features by the module name under which they are introduced. The flexibility permitted by modules more than makes up for the semantic awkwardness they sometimes create. (If you want something approximating a single monolithic specification, the CSS Working Group publishes yearly “Snapshot” documents.) With that established, we’re ready to start understanding CSS. Let’s start by covering the basics of what goes inside a stylesheet.
  • 12. Stylesheet Contents Inside a stylesheet, you’ll find a number of rules which are comprised of selectors and declaration blocks, the latter of which are made up of one or more declarations that are themselves made up of property and value combinations. All put together, they look a little something like this: h1 {color: maroon;} body {background: yellow;} Styles such as these comprise the bulk of any stylesheet—simple or complex, short or long. But which parts are which, and what do they represent? Rule Structure To illustrate the concept of rules in more detail, let’s break down the structure. Each rule has two fundamental parts: the selector and the declaration block. The declaration block is composed of one or more declarations, and each declaration is a pairing of a property and a value. Every stylesheet is made up of a series of rules. Figure 1-1 shows the parts of a rule. Figure 1-1. The structure of a rule
  • 13. The selector, shown on the left side of the rule, defines which piece of the document will be selected for styling. In Figure 1-1, h1 (heading level 1) elements are selected. If the selector were p, then all p (paragraph) elements would be selected. The right side of the rule contains the declaration block, which is made up of one or more declarations. Each declaration is a combination of a CSS property and a value of that property. In Figure 1-1, the declaration block contains two declarations. The first states that this rule will cause parts of the document to have a color of red, and the second states that part of the document will have a background of yellow. So, all of the h1 elements in the document (defined by the selector) will be styled in red text with a yellow background. Vendor prefixing Sometimes you’ll see pieces of CSS with dashes and labels in front of them, like this: -o-border-image. These are called vendor prefixes, and are a way for browser vendors to mark properties, values, or other bits of CSS as being experimental or proprietary (or both). As of early 2022, there were a few vendor prefixes in the wild, with the most common being shown in Table 1-1.
  • 15. -epub- International Digital Publishing Forum ePub format -moz- Mozilla-based browsers (e.g., Firefox) -ms- Microsoft Internet Explorer -o- Opera-based browsers -webkit- WebKit-based browsers (e.g., Safari and Chrome) As Table 1-1 implies, the generally accepted format of a vendor prefix is a dash, a label, and a dash, although a few prefixes erroneously omit the first dash. The uses and abuses of vendor prefixes are long, tortuous, and beyond the scope of this book. Suffice to say that they started out as a way for vendors to test out new features, thus helping speed interoperability without worrying about being locked into legacy behaviors that were incompatible with other browsers. This avoided a whole class of problems that nearly strangled CSS in its infancy. Unfortunately, prefixed properties were then publicly deployed by web authors and ended up causing a whole new class of problems. As of early 2022, vendor-prefixed CSS features are nearly non- existent, with old prefixed properties and values being slowly but steadily removed from browser implementations. It’s quite likely that you’ll never write prefixed CSS, but you may encounter it in the wild, or inherit it in a legacy codebase. Here’s an example: -webkit-transform-origin: 0 0; -moz-transform-origin: 0 0; -o-transform-origin: 0 0; transform-origin: 0 0;
  • 16. That’s saying the same thing four times: once each for the WebKit, Mozilla (Firefox), and Opera browser lines, and then finally the CSS- standard way. Again, this is no longer really necessary. We’re only including it here to give you an idea of what it might look like, should you come across this in the future. Whitespace Handling CSS is basically insensitive to whitespace between rules, and largely insensitive to whitespace within rules, although there are a few exceptions. In general, CSS treats whitespace just like HTML does: any sequence of whitespace characters is collapsed to a single space for parsing purposes. Thus, you can format the hypothetical rainbow rule in the following ways: rainbow: infrared red orange yellow green blue indigo violet ultraviolet; rainbow: infrared red orange yellow green blue indigo violet ultraviolet; rainbow: infrared red orange yellow green blue indigo violet ultraviolet ; …as well as any other separation patterns you can think up. The only restriction is that the separating characters be whitespace: an
  • 17. empty space, a tab, or a newline, alone or in combination, as many as you like. Similarly, you can format series of rules with whitespace in any fashion you like. These are just five examples out of an effectively infinite number of possibilities: html{color:black;} body {background: white;} p { color: gray;} h2 { color : silver ; } ol { color : silver ; } As you can see from the first rule, whitespace can be largely omitted. Indeed, this is usually the case with minified CSS, which is CSS that’s had every last possible bit of extraneous whitespace removed, usually by an automated server-side script of some sort. The rules after the first two use progressively more extravagant amounts of whitespace until, in the last rule, pretty much everything that can be separated onto its own line has been. All of these approaches are valid, so you should pick the formatting that makes the most sense—that is, is easiest to read—in your eyes, and stick with it. CSS Comments CSS does allow for comments. These are very similar to C/C++ comments in that they are surrounded by /&#x2a; and &#x2a;/:
  • 18. /* This is a CSS1 comment */ Comments can span multiple lines, just as in C++: /* This is a CSS1 comment, and it can be several lines long without any problem whatsoever. */ It’s important to remember that CSS comments cannot be nested. So, for example, this would not be correct: /* This is a comment, in which we find another comment, which is WRONG /* Another comment */ and back to the first comment */ WARNING One way to create “nested” comments accidentally is to temporarily comment out a large block of a stylesheet that already contains a comment. Since CSS doesn’t permit nested comments, the “outside” comment will end where the “inside” comment ends. Unfortunately, there is no “rest of the line” comment pattern such as // or # (the latter of which is reserved for ID selectors anyway). The only comment pattern in CSS is /&#x2a; &#x2a;/. Therefore, if you wish to place comments on the same line as markup, then you need to be careful about how you place them. For example, this is the correct way to do it: h1 {color: gray;} /* This CSS comment is several lines */ h2 {color: silver;} /* long, but since it is alongside */ p {color: white;} /* actual styles, each line needs to */ pre {color: gray;} /* be wrapped in comment markers. */
  • 19. Given this example, if each line isn’t marked off, then most of the stylesheet will become part of the comment and thus will not work: h1 {color: gray;} /* This CSS comment is several lines h2 {color: silver;} long, but since it is not wrapped p {color: white;} in comment markers, the last three pre {color: gray;} styles are part of the comment. */ In this example, only the first rule (h1 {color: gray;}) will be applied to the document. The rest of the rules, as part of the comment, are ignored by the browser’s rendering engine. NOTE CSS comments are treated by the CSS parser as if they do not exist at all, and so do not count as whitespace for parsing purposes. This means you can put them into the middle of rules—even right inside declarations! Markup There is no markup in stylesheets. This might seem obvious, but you’d be surprised. The one exception is HTML comment markup, which is permitted inside style elements for historical reasons: <style><!-- h1 {color: maroon;} body {background: yellow;} --></style> That’s it, and even that isn’t recommended any more — the browsers that needed it have faded into near-oblivion. Speaking of markup, it’s time to take a very slight detour to talk about the elements that our CSS will be used to style, and how those can be affected by CSS in the most fundamental ways.
  • 20. Another Random Document on Scribd Without Any Related Topics
  • 21. {248} When the king did see how Robin did flee, He was vexed wondrous sore ; With a hoop and a hallow he vowed to follow, And take him, or never give ore. Come now let’s away, then crys Little John, Let any man follow that dare ; To Carlisle we’l hye, with our company, And so then to Lancastèr. From Lancaster then to Chester they went, And so did king Henry ; But Robin [went] away, for he durst not stay, For fear of some treachery. Says Robin, Come let us for London goe, To see our noble queens face, It may be she wants our company, Which makes the king so us chase. When Robin he came queene Katherin before, He fell low upon his knee : “If it please your grace, I am come to this place For to speak with king Henry.” Queen Katherine answered bold Robin 310 again, The king is gone to merry Sherwood ; And when he went away to me he did say, He would go and seek Robin Hood. “Then fare you well, my gracious queen, For to Sherwood I will hye apace ; For fain would I see what he would with me, If I could but meet with his grace.”
  • 22. But when king Henry he came home, Full weary, and vexed in mind, And that he did hear Robin had been there, He blamed dame Fortune unkind. You’re welcome home, ‘queen’ Katherin cryed, Henry, my soveraign liege ; Bold Robin Hood, that archer good, Your person hath been to seek. But when king Henry he did ‘hear,’ That Robin had been there him to seeke, This answer he gave, He’s a cunning knave, For I have sought him this whole three weeks. A boon ! a boon ! ‘queen’ Katherin cry’d, I beg it here ‘of’ your grace, To pardon his life, and seek not strife : And so endeth Robin Hoods chase.
  • 23. XIV. ROBIN HOOD’S GOLDEN PRIZE. “He met two priests upon the way, And forced them with him to pray; For gold they prayed, and gold they had, Enough to make bold Robin glad; His share came to four hundred pound, That then was told upon the ground. Now mark, and you shall hear the jest, You never heard the like exprest. Tune is, Robin Hood was a tall young man, &c.” This ballad (given from an old black letter copy in the collection of Anthony a Wood) was entered (amongst others) in the Stationers’ book, by Francis Coule, 13th June 1631, and by Francis Grove, 2d June 1656.
  • 24. {250} I have heard talk of Robin Hood, Derry, derry down, And of brave Little John, Of fryer Tuck, and Will Scarlèt, Loxley, and maid Mariòn. But such a tale as this before I think was never knone : For Robin Hood disguised himself, And ‘from’ 311 the wood is gone. Like to a fryer bold Robin Hood Was accoutered in his array ; With hood, gown, beeds, and crucifix, He past upon the way. He had not gone miles two or three, But it was his chance to spy Two lusty priests, clad all in black, Come riding gallantly. Benedicite, then said Robin Hood, Some pitty on me take ; Cross you my hand with a silver groat, For our dear ladies sake. For I have been wandring all this day, And nothing could I get ; Not so much as one poor cup of drink, Nor bit of bread to eat.
  • 25. {251} {252} Now, by our holy dame, the priests repli’d, We never a peny have ; For we this morning have been rob’d, And could no money save. I am much afraid, said bold Robin Hood, That you both do tell a lie ; And now before you do go hence, I am resolv’d to try. When as the priests heard him say so, Then they rode away amain ; But Robin Hood betook to his heels, And soon overtook them again. Then Robin Hood laid hold of them both, And pull’d them down from their horse : O spare us, fryer ! the priests cry’d out, On us have some remorse ! You said you had no mony, quoth he, Wherefore, without delay, We three will fall down on our knees, And for mony we will pray. The priests they could not him gainsay, But down they kneeled with speed : Send us, O send us, then quoth they, Some mony to serve our need. The priests did pray with a mournful chear, Sometimes their hands did wring ; Sometimes they wept, and cried aloud, Whilst Robin did merrily sing.
  • 26. When they had been praying an hours space, The priests did still lament ; Then quoth bold Robin, Now let’s see What mony heaven hath us sent. We will be sharers all alike Of [the] mony that we have ; And there is never a one of us That his fellow shall deceive. The priests their hands in their pockets put, But mony would find none : We’l search ourselves, said Robin Hood, Each other, one by one. Then Robin 312 took pains to search them both, And he found good store of gold, Five hundred peeces presently Upon the grass was told. Here is a brave show, said Robin Hood, Such store of gold to see, And you shall each one have a part, Cause you prayed so heartily. He gave them fifty pounds a-peece, And the rest for himself did keep : The priests [they] durst not speak one word, But they sighed wondrous deep.
  • 27. ROBIN HOOD AND THE FRIARS.
  • 28. {253} ROBIN HOOD AND THE FRIARS. With that the priests rose up from their knees, Thinking to have parted so : Nay, nay, says Robin Hood, one thing more I have to say ere you go.
  • 29. You shall be sworn, said bold Robin Hood, Upon this holy grass, That you will never tell lies again, Which way soever you pass. The second oath that you here must take, That all the days of your lives, You shall never tempt maids to sin, Nor lie with other mens wives. The last oath you shall take, it is this, Be charitable to the poor ; Say, you have met with a holy fryar, And I desire no more. He set them on their horses again, And away then they did ride ; And he return’d to the merry green-wood, With great joy, mirth, and pride.
  • 30. XV. ROBIN HOOD’S RESCUING WILL STUTLY. From an old black letter copy in the collection of Anthony a Wood. The full title is: “Robin Hood his rescuing Will Stutly from the sheriff and his men, who had taken him prisoner, and was going to hang him. To the tune of Robin Hood and Queen Katherine.” 313
  • 31. {255} When Robin Hood in the green wood liv’d, Derry, derry down, Under the green wood tree, Tidings there came to him with speed, Tidings for certainty ; Hey down, derry, derry down ; That Will Stutly surprized was, And eke in prison lay ; Three varlets that the sheriff had hired, Did likely him betray : “I, and to-morrow hanged must be, To-morrow as soon as it is day ; Before they could this victory get, Two of them did Stutly slay.” When Robin Hood he heard this news, Lord ! he was grieved sore ; And to his merry men he did say, (Who altogether swore), That Will Stutly should rescued be, And be brought ‘back’ again ; Or else should many a gallant wight For his sake there be slain. He cloathed himself in scarlet ‘red,’ His men were all in green ; A finer shew, throughout the world, In no place could be seen.
  • 32. {256} {257} Good lord ! it was a gallant sight To see them all on a row ; With every man a good broad sword, And eke a good yew bow. Forth of the green wood are they gone, Yea all couragiously, Resolving to bring Stutly home, Or every man to die. And when they came the castle neer, Whereas Will Stutly lay, I hold it good, saith Robin Hood, Wee here in ambush stay, And send one forth some news to hear, To yonder palmer fair, That stands under the castle wall, Some news he may declare. With that steps forth a brave young man, Which was of courage bold, Thus did hee speak to the old man : I pray thee, palmer old, Tell me, if that thou rightly ken, When must Will Stutly die, Who is one of bold Robin’s men, And here doth prisoner lie ? Alack ! alass ! the palmer said, And for ever wo is me ! Will Stutly hanged must be this day, On yonder gallows-tree.
  • 33. {258} O had his noble master known, He would some succour send ; A few of his bold yeomandree Full soon would fetch him hence. I, that is true, the young man said ; I, that is true, said he ; Or, if they were neer to this place, They soon would set him free. But fare ‘thee’ well, thou good old man, Farewell, and thanks to thee ; If Stutly hanged be this day, Reveng’d his death will be. Hee was no sooner from the palmer gone, But the gates ‘were’ open’d wide, And out of the castle Will Stutly came, Guarded on every side. When hee was forth of the castle come, And saw no help was nigh, Thus he did say to the sherìff, Thus he said gallantly : Now seeing that I needs must die, Grant me one boon, said he, For my noble master nere had a man, That yet was hang’d on the tree. Give me a sword all in my hand, And let mee be unbound, And with thee and thy men Ile fight, Till I lie dead on the ground.
  • 34. {259} But his desire he would not grant, His wishes were in vain ; For the sheriff had sworn he hanged should be, And not by the sword be slain. Do but unbind my hands, he saies, I will no weapons crave, And if I hanged be this day, Damnation let me have. O no, O no, the sheriff said, Thou shalt on the gallows die, I, and so shall thy master too, If ever in me it lie. O, dastard coward ! Stutly cries, Thou faint-heart pesant slave ! If ever my master do thee meet, Thou shalt thy paiment have. My noble master ‘doth thee’ scorn, And all thy ‘coward’ crew ; Such silly imps unable are, Bold Robin to subdue. But when he was to the gallows come, And ready to bid adiew, Out of a bush leaps Little John, And comes Will Stutly ‘to’ : “I pray thee, Will, before thou die, Of thy dear friends take leave :— I needs must borrow him for a while, How say you, master ‘shrieve’ ?”
  • 35. {260} Now, as I live, the sheriff he said, That varlet will I know ; Some sturdy rebell is that same, Therefore let him not go. Then Little John most hastily, Away cut Stutly’s bands, And from one of the ‘sheriffs’ men, A sword twicht from his hands. “Here, Will, here, take thou this same, Thou canst it better sway ; And here defend thyself awhile, For aid will come straightway.” And there they turn’d them back to back, In the middle of them that day, Till Robin Hood approached near, With many an archer gay. With that an arrow by them flew, I wist from Robin Hood ; Make haste, make haste, the sheriff he said, Make haste, for it is good. The sheriff is gon, his ‘doughty’ 314 men Thought it no boot to stay, But, as their master had them taught, ‘They’ run full fast away. O stay, O stay, Will Stutly said, Take leave ere you depart ; You neere will catch bold Robin Hood, Unless you dare him meet.
  • 36. {261} O ill betide you, quoth Robin Hood, That you so soon are gone ; My sword may in the scabbord rest, For here our work is done. I little thought, ‘Will Stutly said,’ 315 When I came to this place, For to have met with Little John, Or seen my masters face. Thus Stutly was at liberty set, And safe brought from his foe : “O thanks, O thanks to my mastèr, Since here it was not so : And once again, my fellows [all], We shall in the green woods meet, Where we [will] make our bow-strings twang, Musick for us most sweet.”
  • 38. XVI. THE NOBLE FISHER-MAN; OR, ROBIN HOOD’S PREFERMENT: “Shewing how he won a prize on the sea, and how he gave the one halfe to his dame, and the other to the building of almes-houses. The tune is, In summer time, &c.” From three old black letter copies, one in the collection of Anthony a Wood, another in the British Museum, and the third in a private collection.
  • 39. {263} {264} In summer-time, when leaves grow green, When they doe grow both green and long,— Of a bold outlaw, call’d Robin Hood, It is of him I sing this song,— When the lilly leafe, and the ‘eglantine,’ Doth bud and spring with a merry cheere, This outlaw was weary of the wood-side, And chasing of the fallow-deere. “The fisher-men brave more mony have Than any merchants two or three ; Therefore I will to Scarborough go, That I a fisherman brave may be.” This outlaw called his merry men all, As they sate under the green-wood tree : “If any of you have gold to spend, I pray you heartily spend it with me.” Now, quoth Robin Hood, Ile to Scarborough go, It seems to be a very faire day. ‘He’ tooke up his inne at a widdow-womans house, Hard by upon the water gray : Who asked of him, Where wert thou borne ? Or tell to me where dost thou fare ? I am a poor fisherman, said he then, This day intrapped all in care. “What is thy name, thou fine fellòw, I pray thee heartily tell it to mee ?” “In my own country, where I was borne, Men call me Simon over the Lee.”
  • 40. {265} Simon, Simon, said the good-wife, I wish thou mayest well brook thy name. The out-law was ware of her courtesie, And rejoyced he had got such a dame. “Simon, wilt thou be my man ? And good round wages Ile give thee ; I have as good a ship of my own, As any sails upon the sea : Anchors and planks thou shalt not want, Masts and ropes that are so long.” And if you thus do furnish me, Said Simon, nothing shall goe wrong. They pluckt up anchor, and away did sayle, More of a day then two or three ; When others cast in their baited hooks, The bare lines into the sea cast he. It will be long, said the master then, Ere this great lubber do thrive on the sea ; I’le assure you he shall have no part of our fish, For in truth he is no part worthy. O woe is me ! said Simon then, This day that ever I came here ! I wish I were in Plompton parke, In chasing of the fallow deere. For every clowne laughs me to scorne, And they by me set nought at all ; If I had them in Plompton park, I would set as little by them all.
  • 41. {266} They pluckt up anchor, and away did sayle, More of a day then two or three : But Simon espyed a ship of warre, That sayled towards them most valorously. O woe is me ! said the master then, This day that ever I was borne ! For all our fish we have got to day, Is every bit lost and forlorne. For your French robbers on the sea, They will not spare of us one man, But carry us to the coast of France, And ligge us in the prison strong. But Simon said, Doe not feare them, Neither, mastèr, take you no care ; Give me my bent bow in my hand, And never a Frenchman will I spare. “Hold thy peace, thou long lubbèr, For thou art nought but brags and boast ; If I should cast thee over-board, There’s but a simple lubber lost.” Simon grew angry at these words, And so angry then was he, That he took his bent bow in his hand, And in the ship-hatch goe doth he. Master, tye me to the mast, saith he, That at my mark I may stand fair, And give me my bent bow in my hand, And never a Frenchman will I spare.
  • 42. {267} He drew his arrow to the very head, And drew it with all might and maine, And straightway in the twinkling of an eye, ‘To’ the Frenchmans heart the ‘arrow’s gane.’ 316 The Frenchman fell down on the ship-hatch, And under the hatches ‘there’ below ; Another Frenchman, that him espy’d, The dead corpse into the sea doth throw. O master, loose me from the mast, he said, And for them all take you no care ; For give me my bent bow in my hand, And never a Frenchman will I spare. Then streight [they] boarded the French ship, They lyeing all dead in their sight ; They found within ‘that’ ship of warre, Twelve thousand pound of mony bright. The one halfe of the ship, said Simon then, Ile give to my dame and [her] children small ; The other halfe of the ship Ile bestow On you that are my fellowes all. But now bespake the master then, For so, Simon, it shall not be, For you have won it with your own hand, And the owner of it you shall bee. “It shall be so, as I have said ; And, with this gold, for the opprest An habitation I will build, Where they shall live in peace and rest.”
  • 44. {269} XVII. ROBIN HOOD’S DELIGHT: “Or, a merry combat fought between Robin Hood, Little John, and Will Scarelock, and three stout Keepers in Sheerwood Forrest. Robin was valiant and stout, So was Scarelock and John in the field, But these Keepers stout did give them rout, And made them all for to yield. But after the battel ended was, Bold Robin did make them amends, For claret and sack they did not lack, So drank themselves good friends. To the tune of, Robin Hood and Queen Katherine; or, Robin Hood and the Shepheard.” From an old black letter copy in the collection of Anthony a Wood.
  • 45. {270} There’s some will talk of lords and knights, Doun, a doun, a doun, And some of yeomen good ; But I will tell you of Will Scarlòck, Little John, and Robin Hood. Doun, a doun, a doun, a doun. They were outlaws, ’tis well known, And men of a noble blood ; And many a time was their valour shown In the forrest of merry Sheerwood. Upon a time it chanced so, As Robin 317 would have it be, They all three would a walking go, The pastime for to see. And as they walked the forest along, Upon a Midsummer day, There was they aware of three keepèrs, Clad all in green aray. With brave long faucheons by their sides And forrest-bills in hand, They call’d aloud to those bold outlàws, And charged them to stand. Why, who are you, cry’d bold Robìn, That ‘speak’ so boldly here ? “We three belong to King Henry, And are keepers of his deer.”