YEAR 11 DIGITAL TECHNOLOGY
  • Computer Literacy
    • Basics
    • File Types
    • Compression
  • Animation
    • Adobe Illustrator >
      • Intro to Illustrator
      • Review of Illustrator Techniques
      • Illustrator - The Third
      • Advanced Illustrator
    • Adobe After Effects >
      • Basic Animation
      • Export to Youtube
      • Rigging
      • Animation Project
    • Project Documentation >
      • Purpose, Potential Users, Requirement and Specifications
      • Testing and Refinement
    • AS92005 - Develop a Digital technologies outcome
  • HTML/CSS Basics
    • HTML
    • CSS
    • Classes
  • Programming
    • Learn Basics - Variables and Prompts
    • If Statements
    • For Loops & Basic Arrays
    • While Loops & Functions
    • Robustness
    • Debugging
    • Skills Test
    • Testing and Documentation
    • Programming Assessment
  • HCI
    • AS92006 - HCI Exam
    • Introduction-Describe-Identify
    • Neilson's Heuristics
    • mātāpono Māori
    • Explaining Principles
    • Compare/Improvements
    • Practice Practice Practice
  • Data
    • Learn Excel
    • Learn Excel (Part Deux)
    • Practice Assessment
    • Practice Assessment 2 - police
    • Assessment
  • Freyberg Digital

Classes

Most of the time when we are styling a website we want to be able to make tailored changes to individual elements, rather than broad stroke changes to everything all at once. To do this we can use classes and ids, let's look at classes first.

Let's say I wanted to have paragraphs of text that had different colours, red and blue. What I can do is create classes that we put onto our HTML elements that will set them with the specific colour. For example:
Picture
Now that we have put these classes on our HTML element we can add our CSS that will do the job that we're wanting done. Here's our CSS:
Picture
Task 1: Create 4 classes in your trains website and use them to style some elements in different ways. Try adding properties to elements that you perhaps haven't toyed with yet (like <img>). Hint: try using border-radius.

Task 2: First, make sure that you have 5 different images on your site.
​Next, create 5 classes in your CSS: .img-xs, img-s, img-m, img-l, img-xl
Use the "width" property to set these with different widths (xs being the smallest, xl being the largest) and give these classes to the different images on your site.
Powered by Create your own unique website with customizable templates.
  • Computer Literacy
    • Basics
    • File Types
    • Compression
  • Animation
    • Adobe Illustrator >
      • Intro to Illustrator
      • Review of Illustrator Techniques
      • Illustrator - The Third
      • Advanced Illustrator
    • Adobe After Effects >
      • Basic Animation
      • Export to Youtube
      • Rigging
      • Animation Project
    • Project Documentation >
      • Purpose, Potential Users, Requirement and Specifications
      • Testing and Refinement
    • AS92005 - Develop a Digital technologies outcome
  • HTML/CSS Basics
    • HTML
    • CSS
    • Classes
  • Programming
    • Learn Basics - Variables and Prompts
    • If Statements
    • For Loops & Basic Arrays
    • While Loops & Functions
    • Robustness
    • Debugging
    • Skills Test
    • Testing and Documentation
    • Programming Assessment
  • HCI
    • AS92006 - HCI Exam
    • Introduction-Describe-Identify
    • Neilson's Heuristics
    • mātāpono Māori
    • Explaining Principles
    • Compare/Improvements
    • Practice Practice Practice
  • Data
    • Learn Excel
    • Learn Excel (Part Deux)
    • Practice Assessment
    • Practice Assessment 2 - police
    • Assessment
  • Freyberg Digital