User Tools

Site Tools


eg-146:lecture15

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eg-146:lecture15 [2012/03/15 20:18] – [A Catalogue of style selectors] eechriseg-146:lecture15 [2012/03/19 08:15] (current) – [Answers] eechris
Line 1: Line 1:
 ~~SLIDESHOW~~ ~~SLIDESHOW~~
-====== Introduction to CSS  ======+====== Introduction to Cacscading Stylesheets (CSS ======
  
 **Contact Hour 15**: To be discussed on Monday 20th March, 2012. **Contact Hour 15**: To be discussed on Monday 20th March, 2012.
Line 165: Line 165:
 the one that appears later wins, and thus I am magenta! (4)</p> the one that appears later wins, and thus I am magenta! (4)</p>
 </code> </code>
-Don't believe me? Try it yourself!+Don't believe me? [[http://www.bruceontheloose.com/htmlcss/examples/chapter-07/specificity.html|Try it yourself]]!
  
 ===== The Cascade: Location ===== ===== The Cascade: Location =====
Line 471: Line 471:
  
 To illustrate the various style selectors, and how the work,  To illustrate the various style selectors, and how the work, 
-we apply the simple style declaration ''color: red'', to various selections of an [[/eg-146/selector/template.html|example]] document.+we apply the simple style declaration ''color: red'', to various selections of an [[/eg-146/selectors/nostyle.html|example]] document.
 Follow the links to [[http://www.bruceontheloose.com/htmlcss/examples/#chapter-9|Chapter 9: Defining Selectors]]  Follow the links to [[http://www.bruceontheloose.com/htmlcss/examples/#chapter-9|Chapter 9: Defining Selectors]] 
 to see these examples live. to see these examples live.
Line 483: Line 483:
     <meta charset="utf-8" />     <meta charset="utf-8" />
     <title>Antoni Gaud&iacute; &ndash; Introduction</title>     <title>Antoni Gaud&iacute; &ndash; Introduction</title>
-    <link rel="stylesheet" media="screen" href="name.css" />+    <link rel="stylesheet" media="screen" href="nostyle.css" />
   </head>   </head>
   <body>   <body>
Line 645: Line 645:
 ''h1'' is the first child so this works  ''h1'' is the first child so this works 
 ===== Selecting sibling elements ===== ===== Selecting sibling elements =====
-  * This selector chooses only those ''p'' elements which directly follow a sibling ''p'' element within an ''article'' with an ''about'' class  ([[/eg-146/selectors/context.html|result]]):+  * This selector chooses only those ''p'' elements which directly follow a sibling ''p'' element within an ''article'' with an ''about'' class  ([[/eg-146/selectors/adjsibling.html|result]]):
  
 <code css> <code css>
eg-146/lecture15.1331842717.txt.gz · Last modified: 2012/03/15 20:18 by eechris