Full screen? Down there.
<p class="special-1">content</p>
Use class to apply a specific style to more than one element.
class attribute
class name
.special-1{
color:red;
}
<p id="special-2">content</p>
Use ID to apply a specific style to only ONE element.
ID attribute
ID name
#special-2{
color:red;
}
<div style="width:400px; height:400px;">content</div>
or
<div>content</div>
div{
width:400px;
height:400px;
}
* added a border for emphasis
default height
Putting it all together!
Create this layout!
Flexbox
We will be using flexbox in this course.
Since I started coding in 2017, this is primary way I learned to layout a site.
The other traditional way to layout a site is using "floats".
I don't like floats.
We will be devoting all of next class to learning flexbox but if you want a head start, here some resources on both.
Float Based Layout
Flexbox
div{
display:flex;
}
justify-content:
flex-direction:
flex-wrap:
flex-flow:
justify-content:
align-items:
align-content:
Common Properties
Turn on Flexbox
Instructions
In the next slide you will see a codepen
The div labeled "homework" is where you will be placing your code solution.
Pay close attention to both panels, make sure you are putting the right code in the right spot.
All your answers (if done correctly) will remain in the grey area.
Recap
Articles
Websites
Tutorials
Extras
1. Create Accounts
2. Try to complete Flexbox Froggy
3. Complete Optional Glitch Challenges
Go through the Create Accounts Slide deck and create all accounts.
Give it a try! See how far you get
The next slide will be the last slide :)