Skip to content

Matcote/m1-2-htmlcss--css-basics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1.2 - CSS: The Basics - Workshop

Unless specified in the exercise, don't worry about the fonts. Some of the screenshots were taken on Linux and the base system font is a little different.

Exercise 1

  • Open the provided index.html file in the browser.
  • Modify the style.css file to match the following image

exercise-1 goal

  • background color is blue
  • properties used: padding, border, background, color, border-radius.
    • HINT: you need to remove the default border.
  • Don't worry if your font looks different

Exercise 2

  • Open the provided index.html file in the browser.
  • Modify the style.css file to match the following image

exercise-2 goal

  • Colors used are pink and fuschia
  • text size is 5em for the last line.
  • Don't worry if your font looks different

Exercise 3

  • Open the provided index.html file in the browser.
  • Modify the style.css file to match the following image

exercise-3 goal

Properties you will likely need

font-size
font-style
font-family
text-align
  • You will need to use the Comic Sans MS font-family

Exercise 4

The style.css file contains errors. Modify that file, and only that file, to produce the following output:

exercise-4 goal

Exercise 5

The style.css file has been corrupted. Repair the CSS so that the page matches the image below.

exercise-5 goal

No modifications to the HTML file.

Exercise 6

Add the CSS needed to reproduce this page.

exercise-6 goal

The exact measurements are not needed. Try and estimate the values (colors, font-sizes, etc).

Exercise 7

Complete both the HTML and CSS files to reproduce the following web page:

It isn't necessary to make it pixel perfect.

exercise-7 goal


🟡 - Minimally complete workshop (75%) - 🟡

Exercise 8

Update the CSS file to reproduce the following:

exercise-8 goal

Properties Needed

display
visibility

Exercise 9

Update the CSS file to reproduce the following:

exercise-9 goal

  • The alpaca stays at the top left of the screen but must appear in front of the cat image
  • The cat is moved to the top left of the screen
  • The dog must be 50% away from the top and from the left of the screen and always stay there (even when scrolling down)
  • The whales must be moved to the bottom left of the screen

Properties Needed

z-index
top
left
position
bottom
right

🟢 - Complete workshop (100%) - 🟢

Exercise 10 - Stretch

Using CSS, create a button that animates on hover:

stretch-1 goal

  • It should color to a dark-blue when focused. It should not have the typical "focus ring" (blue outline on MacOS, dotted outline on Windows).
  • It should shrink when the mouse is held down on it.
  • It should be animated

Necessary properties/techniques

  • You'll need the :active and :focus pseudoselectors
  • You'll also need to use the transform: scale property for the size change, and the transition property for the animation.
  • You can disable the outline with outline: none, but you should only do this if you have an alternative focus state. That outline is very important for keyboard users, to know which element is focused.

Resources


Links to more practice

Additional Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 59.7%
  • CSS 40.3%