CSS Master
http://community.sitepoint.com/ SitePoint'sforums,forhelponanytrickywebproblems.
[email protected]
Ouremailaddress,shouldyoune ...
Chapter 1 Selectors CSSrulesarematchedtoelementswithselectors.Thereareanumberofwaysto dothis,andyou’reprobablyfamiliarwithmostof ...
Browser Coverage for Selectors Acomprehensivelookatthecurrentstateofbrowsersupportforselectorscanbe foundatCSS4-Selectors.^3 Com ...
Figure 1.1. Our HTML form that we’ll style using combinators ThisformwascreatedusingthefollowingchunkofHTML: <form method="GE ...
<input type="number" value="1" name="quantity" ➥ id="quantity" step="1" min="1" max="8"> </p> </fieldset> < ...
</p> <p> <label for="zip">ZIP</label> <input type="text" id="zip" name="zip" placeholder= ➥"12345" ma ...
Figure 1.2. The effect of a descendant combinator Let’saddsomemoreCSS,thistimetoincreasethesizeofourpricingmessage (“Ticketsare$ ...
Figure 1.3. Oops! Our selector is too broad The Child Combinator Incontrasttothedescendantcombinator,thechildcombinator(>)sel ...
Figure 1.4. The effect of the child combinator The Adjacent Sibling Combinator Withtheadjacentsiblingcombinator(+),wecanselectel ...
Figure 1.5. Adjacent combinator to the rescue Let’slookatanotherexamplethatcombinestheuniversalselector(*)withatype selector: 01 ...
Figure 1.6. Using the adjacent sibling combinator to adjust the bottom margin for our fieldset elements More Uses of the Adjacen ...
Let’slookattheNumber of Ticketsfieldagain.Itsmarkuplookslikethis: <p> <label for="quantity">Number of Tickets</la ...
Figure 1.7. The ~ combinator targets sibling elements, regardless of whether they’re adjacent Usingthegeneralsiblingcombinatoris ...
Someoftheattributeselectorswe’llcoverhereareoldhat.Boththehyphenated attributevalueselectorandthespace-separatedattributevaluese ...
color: #34444C; } [rel~=friend]:hover{ background: #ffeb3b; border-color: #ffc107; } ThisgivesustheimageinFigure1.8. Figure 1.8. ...
Atfirstglance,thismayseemlikeauselessselector;however,it’squitepractical forworkingwithlanguagesandlanguagecodes—suchasen-USores ...
<article class="articlepromo-entertainment"> <h3>Kardashian-Wests welcome South to the world</h3> <p>Lor ...
Figure 1.9. Using hyphenated attributes to style elements Wecanalsouseitwithidnames;forexample,[id|=global]wouldmatch#global- fo ...
$= matcheswhenthesubstringsitsattheendofthestring. *= matcheswhenthesubstringispresentatanypositionwithinthestring. Whenmightthe ...
[href$="5555"] { background: #e91e63; } It’smoreuseful,obviously,tomatchelementsthatendwiththesamesuffix.For example,youcouldmat ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf