diff --git a/lab_030.html b/lab_030.html index c70de50..c9a1505 100644 --- a/lab_030.html +++ b/lab_030.html @@ -94,6 +94,8 @@
<h1>
headings with the id="main-title"
.
+ Note:Make sure the HTML selector comes first and there is no space between the HTML + selector and the class or ID in order to use it in this way.
This is an advanced selector that that we'll use to style <input>
tags. Attribute selectors ([]) select an element based on any attributes attached to its HTML
diff --git a/lab_031.html b/lab_031.html
index e2bf8a7..bfdced4 100644
--- a/lab_031.html
+++ b/lab_031.html
@@ -43,26 +43,37 @@
Pseudo classes are an extra add-on to CSS selectors that make selections
- that much more specific. They target an element's state or interaction.
- The ones we will talk about are link
,
+ that much more specific. They target an element's state or interaction. For
+ example, if we want a different style for when someone hovers over a button or after a link
+ has been pressed.
The ones we will talk about are link
,
visited
, active
,
hover
, and focus
.
The pseudo classes below target unvisited and visited links respectively. The styles will - apply depending on whether the user has visited the page before.
+The pseudo classes, link
and
+ visited
, below target unvisited and visited links
+ respectively. The styles will apply depending on whether the user has visited the page before.
+
The following pseudo classes handle interactions with link.
+The following pseudo classes are dynamic pseudo classes. They are applied when something happens + or for a specific kind of interaction.
active
handles the user activating, or clicking on, something e.g. the
+ link.hover
handles user input moving over the element e.g. a mouse hovering
+ over a linkfocus
handles when something is selected by, or is ready for, keyboard
+ inputNote: focus
is most often used for form
+ elements such as <input>
or <textarea>
, however they can also be used on links for increased
+ accessibility! Some visitors may be using a keyboard to navigate the website.
Git
You can group multiple selectors in order to give them all the same styling. Separate selectors by + commas before the curly brackets in order to group them. +
+For example:
+ +Can be grouped into the following:
+ + +If you have well structured and semantic HTML, you can make use of CSS nesting in order to cut + down on the amount of class attributes. Separating two selectors with a space will select all + the descendents + of the first selector that is the second selector.
+ +If the HTML was:
+ +You would be able to select the heading and paragraphs with the nested CSS instead of a class or ID attribute.
+ Separating the two selectors is the same as saying "<h1>
inside of an
+ element with id="special"
" or "<p>
inside of an element
+ with id="special"
".
+
Special Paragraph
+Another Special Paragraph
+