Great Blog Post with Tutorial and quick get started info
http://ucsbwebdev.local/index.php/2018/05/01/css-frameworks-review/
Recordings from previous classes:
http://ucsbwebdev.local/index.php/2018/04/30/using-a-framework-from-homework-3/
http://ucsbwebdev.local/index.php/2018/05/24/frameworks-overview-midterm-practice-recording/
Utilize the Builder!
http://webdevninja.surge.sh/#/
Links to review in class
Codepen To Play With
Homework for this week is focused on our final projects. There are two parts.
Part 1: Provide a wireframe of at least your main/home page. This can be from GoMockingbird, or a picture of your notebook. Should look something like this:

Part 2: Provide a simple outline of the 6 main features/functionalities of your website like this
- Header with menu navigation and a Request a Demo call to action button
- A Hero section that sells the concept of the product with an image of the product
- etc..
Homework is due Tuesday 13th of November via email, please make subject Homework 4
Let’s get your CSS skills up to par with this fun exercise. The final result should resemble something like this:

Download the initial HTML code from this link https://my.pcloud.com/publink/show?code=XZpAHM7ZkMJvAaSzqeSD8pN8oSFlw8m00AQk inside your Class folder and double-click to extract it. Then open it in Visual Studio Code.
The following boxes should exist:
- div.header.flex
- h1.logo
- div.header-menu
- a.menu-item href #about
- a.menu-item href #news
- a.menu-item href #contact
- div.about.flex id=about
- div.about-left
- img.about-image src=link to image of you
- h3.about-name
- p.about-text
- div.about-right
- div.news id=news
- h2
- div.news-story
- div.news-story
- div.contact id=contact
- h2
- div.contact-info.flex
- div.contact-map
- iframe (from google maps embed http://x.co/gmapslink
- or use the following code directly
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3291.5035300186455!2d-119.85113568388252!3d34.413962880508954!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80e93f67f3314b37%3A0x4e956b7e5cb6cec2!2sUniversity+of+California%2C+Santa+Barbara!5e0!3m2!1sen!2sus!4v1540941782587" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
- div.contact-address
Your stylesheet should contain the following classes and declarations
- .logo
- margin 0
- padding 0
- color red
- .menu-item
- .about-left
- .about-right
- .about-image
- .about-name
- .news-story
- .contact-address
Let’s start with some sample div that has a class:
<div class="nameOfDiv">
Some text
</div>
Now in our stylesheet (or in a codepen use the CSS section and enter your CSS code) we select this specific div with the . selector for class:
.nameOfDiv {
/* We'll enter our declarations here */
}
Inside the curly brackets, we can enter a new declaration on each line. Here is a nice overview of the possible properties you can specify:
| Declaration key |
Declaration values |
Explanation of property |
| background |
black, red, orange, pink, tomato, green, white, etc |
Sets the background color of our element. It takes in a name of a color. |
| color |
same as background, a named color |
Set the text color of the element (all children of the element will inherit this color!) |
| width |
% (of the page) or pixels using px. 30% or 300px |
Sets the horizontal size of our element |
| height |
% (of the page) or pixels using px. 30% or 300px |
Sets the vertical height of our element |
| padding |
Preferably use pixels, but can also take in %. 15px |
Sets the inner padding of an element |
| margin |
Preferably use pixels, but can also take in %. 15px |
Sets the outer margin of an element |
| display |
block, inline, inline-block, flex |
Allows us to choose how we want our element to display on the page. Flex makes all immediate children into columns. |
Now let’s combine all these declarations inside our CSS selector:
.nameOfDiv {
background: orange;
color: white;
width: 150px;
height: 50px;
padding: 15px;
margin: 10px;
display: inline-block;
}
Great, now the result should look like this:

If we simply add a couple more div’s with the same name the result would be:

This is thanks to the power of an inline-block element which gets the benefits of block (padding/margin) and inline by showing multiple elements on the same line!
An alternative way to accomplish the same result without using display inline-block is to use flex. We need to add a parent that wraps the three div’s nameOfDiv and make the parent display flex. Like this:
<div class="flex">
<div class="nameOfDiv">Some text</div>
<div class="nameOfDiv">Some text</div>
<div class="nameOfDiv">Some text</div>
</div>
And the CSS would be:
.flex {
display: flex;
}
.nameOfDiv {
background: orange;
color: white;
width: 150px;
height: 50px;
padding: 15px;
margin: 10px;
}
Notice that nameOfDiv is no longer display inline-block. However, with the flex parent we still see:

Feel free to play with the flex example here https://codepen.io/agrublev/pen/ZqdGXR
Here is a great list of resources to utilize:
- https://www.learnsketch.com/tutorials
- http://sketchmaster.com/ (paid)
- https://www.sketchapp.com/docs/the-interface/
- https://www.sketchappsources.com/tutorials-tips.html
- https://medium.com/sketch-app-sources/sketch-a-beginner-s-guide-9a6c13ad408d