UMass Lowell Dept. of Computer Science

91.461 GUI Programming I

Fall 2015 Semester, Section 201

Prof. Jesse M. Heines

Notes for Class No. 6

Working with CSS Selectors (continued)

Thursday, September 17, 2015

A video of this class is (or will be) posted at:   http://echo360.uml.edu/heines201516/guiprogramming1.html


Handouts and Materials


Openings / Announcements / Reminders


I am planning a short quiz on CSS selectors on either Tuesday or Thursday of next week

The following people still have not made the corrections on Piazza that I requested


Class Notes

Related reading for this class:  CSS3:TMM Ch. 3


Finishing Up Our Discussion of Basic CSS Selectors

Review from last class ...

Attribute Selectors

img[title] —> all img tags that have a title element

input[type="button"] —> all buttons

a[href="http://jesseheines.com"] —> all a[nchor] tags that link to the default page on jesseheines.com

a[href^="http://jesseheines.com"] —> all a[nchor] tags that link to any page on jesseheines.com

filter operators

New material begins here ...

Child Selectors

:first-child
:last-child
:nth-child

:nth-child(odd)
:nth-child(even)

:nth-child(Nn+S) where N is the repeat factor and S is the starting child

https://css-tricks.com/useful-nth-child-recipies/

Additional Selector Operators

>  means immediate descendents, which is very useful with nested lists

+  means sibling, that is directly following

and please note that there are even more pseudo selectors and more being added, but these are the basic ones


Formatting Text  (CSS:TMM, Chapter 6)

CSS Properties Reference

http://w3schools.com/cssref/default.asp


Review of Basic Concepts

Font Sizing

Words and Letters

Kerning Demonstration

Paragraph Spacing

Pseudo-Elements

Lists

McFarland CSS MM Fig. 6-10
[figure source:  CSS: The Missing Manual, by David Sawyer McFarland, Fig. 6-10, p. 134]

Note that when manipulating class names in JavaScript, the class name property is in camel case: className


This concludes our introduction to CSS


Introduction to Git and GitHub

Please do the following before our next class, as we will use GitHub in a future assignment



This is document http://jesseheines.com:8080/~heines/91.461/91.461-2015-16f/461-lecs/lecture06.jsp.  It was last modified on Friday, August 26, 2022 at 4:09 PM.
Copyright © 2022 by Jesse M. Heines.  All rights reserved.  May be freely copied or excerpted for educational purposes with credit to the author.