Descendant selectors create a more specific groups of styled content.
div p{
color:#ff0000;
}
Any paragraph inside of a div will have red text.
See the Pen UA-ITR-Descendant Selectors by Jon (@Middaugh) on CodePen.
You can make your selectors more specific by using multiple selectors joined together
div.class {}
.class1.class2 {}
See the Pen UA-ITR-Combined Selectors by Jon (@Middaugh) on CodePen.
See the Pen UA-ITR-CombinedSelectors2 by Jon (@Middaugh) on CodePen.
:hover
The :hover
class allows you to apply a custom class when an element is being hovered over.
a:hover{ }
.class:hover{ }
See the Pen UA-ITR-CSS Psuedo Selector by Jon (@Middaugh) on CodePen.
See the Pen UA-ITR-CSS Psuedo Selector-Advanced by Jon (@Middaugh) on CodePen.
overflow
overflow
controls what happens when your content is forced outside of its declared size.
You've set the height of a div to 150px in height
and have several paragraphs inside of it
visible
- default value content continues outside of its boxhidden
- hides content that overflowsscroll
- Adds scroll bars to content even if it doesn't overflow.
auto
- Adds scroll bars, but only if the content overflows the box.See the Pen UA-ITR-CSS-Overflow by Jon (@Middaugh) on CodePen.
See the Pen UA-ITR-CSS-Overflow by Jon (@Middaugh) on CodePen.
overflow-x
overflow-y
white-space
white-space
controls how text operates in an element with a defined width.
normal
- Default valuenowrap
- prevents text from wrappingtext-overflow
text-overflow
is used with white-space
and overflow
to add cut offs to text
See the Pen UA-ITR-CSS-TextWrap by Jon (@Middaugh) on CodePen.
text-shadow
The text-shadow
is made up of 4 values
You can add multiple shadows by separating them with a comma.
OverviewSee the Pen UA-ITR-CSS-TextShadow by Jon (@Middaugh) on CodePen.
There are five kinds of positioning
An element with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed).
However; if an absolute positioned element has no positioned ancestors, it uses the document body, and moves along with page scrolling.
Semantic HTML adds readability to your HTML tags. There aren't strict rules around
Basic Overviewsection
A section
declares a basic grouping of similar content.
article
Use of the article
tag represents a block of content that can be read independently from the rest of
the site.
aside
Aside
contains content related to the surrounding content.
header
The header
element identifies basic information about the following content.
footer
or another header
footer
The footer
element identifies basic information about the following content.
article
author informationarticle
related documentsnav
The nav
element is used to define a list of major navigation links.
article
You add JavaScript in a similar way that you add CSS to your page.
script
tag
Allows you and your team to work together on the same project.
The project doesn't have to be a program. You can use a version control system to write a book with other people.
Version control create a history of all the changes you want to be saved.
It allows you to revert or go back in time if you happen and undo any mistakes that may have been made.
Centralized version control has one main server that saves the content.
Each user has a fully copy of the history of the project locally and they selectively push updates to the main repository location
A location of files and information about all the previous versions of those files.
git clone copies an existing repository to a local folder.
git clone https://github.com/jquery/jquery.git
git pull pulls down any changes from the source repository into your local repository.
cd jquery
git pull
You use the git add to tell git to track specific files.
#Add a specific file
git add Readme.md
#Add a whole everything
git add .
Staging changes informs git about what is about to be changed
git commit takes all of the staged changes and creates a historical bookmark of what changes were made, who made them, and a message that is a brief description of the changes.
git commit -m "Adding a new page"
#Auto stage modified files
git commit -a -m "Adding another new page"
git push sends the most recent commits to the remote source repository. You must have the latest version of the remote repository for a push to be accepted.
#first time push only
git push -u origin master
git push
A merge occurs whenever there are new commits in the source repository and you have commits that have not yet been pushed to the source repository.
Merges happen behind the scenes and are frequently not noticed unless changes conflict with each other.
Merge conflicts occur when changes are made to the same file and git cannot determine which changes should be used.
A fork of a repository is a user's personal copy of another user's repository. The user can make changes as they want and continue to pull updates from the source repository.
A request to take the changes from your repository to be merged into the source repository.
This is how you would contribute to open source software on GitHub
Exercise 7 is going to open up the opportunity to develop your own CSS style. Do your best to create the image on the next page. Add classes to the HTML as you see fit.
#aa0000
#55aa00
#00aaaa
#000000