-
It’s stylin’ time, fam

-
-
-
Let’s talk about CSS, or Cascading Style SHeets, the language that allows us to define styles and adjustments to default content on our webpages.
-
Before getting into the specifics, let’s talk about linking our code to HTML.
<head>
<!-- include css file in your webpage -->
<link rel="stylesheet" href="...">
</head>
-
Absolute/Relative URLs (or as they are sometimes called, paths).
Absolute URL A URL that contains the full path. For example, https://validator.w3.org/nu/#textarea is an example of an absolute URL. Contains both the hostname and the full path to file.
-
Relative URL A URL that contains only a fragment of the full address. For example, /nu/textarea.
NOTE: this won’t actually work! However, the people in https://validator.w3.org would be able to use this correctly because relative URLs use the hostname of the page they are on.
-
When to use each type
In general, if you are linking to an image or some other resource that lives on the internet, use absolute paths.
When you are linking to something like CSS stylesheets or javascript files or images that live on your servere you should definitely use relative paths.
-
Basic Definition Method for searching your html tags efficiently and styling the results it finds.
-
** Three ways to CSS **
-
Here are the main problems that we will aspire to be able to solve in this section.
-
Consider this repo. You are given several “websites”. However they are set up in strange configurations! For Each Folder
HEAD section-
Let’s practice what we just learned tho
-
-
Then, given the following pages, please complete the task outlined.
-
-
These are examples of CSS3 uses that we will either cover today or at some point in the duration of the course.
-
Here are some interesting use cases where CSS3 in particular becomes super handy.
-
You can do some really awesome work with animating your elements.
-
Transitions are animations that are triggered usually by some form of user interaction.
-
Psuedo classes allow us to style specific types of element features, i.e. the :hover pseudo selector can be used to style an element as the user puts his mouse over it.
-
Keep track of content and determine how it should behave if there is more content than space in the container.
-
This one is super expansive and you could literally teach an entire course on this. For now, take a look at a few examples / problems to gain perspective on this.
-
See if you can implement some of the more simple ones outlined here into one of your websites (either the resume or the Wendy Bite).
-
-
Let’s practice what we just learned tho
-
-
Then, given the following pages, please complete the task outlined.
-
👇👇👇
-
The Box Model is a way of thinking about CSS DOM elements on the page. Instead of thinking of HTML elements as bits of HTML wrappers we style, we can think of them as boxes with specific dimensions and properties. Given this though, an HTML layout can be thought of as boxes within boxes.
-

In general, the width of a DOM element is padding + border + content.
-
The main implications of this has to do with building rows with multiple tags / items inside of it. The widths adding up to 100% isn’t enough – the width + padding + border + margin must add up to 100%!
-
This is a useful tool. We can use box-sizing to force the padding to be pulled into our content width. This way, padding is not added to the overall width. Types: content-box, border-box
-
Due March 13, 2018 at midnight.
-
Starter code on GitHub: download this repo then create a new repo on GitHub to for this project.
-
-
-