Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Sticky Positioning | Item Positioning
Advanced CSS Techniques
course content

Course Content

Advanced CSS Techniques

Advanced CSS Techniques

1. Introduction
2. Item Positioning
3. Transitions
4. Animations
5. Transformations
6. Adaptive/responsive websites and apps
7. Preprocessors

Challenge: Sticky Positioning

Task

Create a blog layout for animal articles, ensuring that the corresponding animal photo is always visible while the user reads the article. When the user starts reading about another animal, offer the next animal photo. Steps:

  1. Apply sticky positioning to the element with the class name illustration.
  2. Specify the position on the page where the element should become sticky.
html

index

css

index

js

index

  1. To make the animal illustrations stick to the top of the viewport while the user reads the article, apply the sticky positioning to the element with the class name illustration.
  2. Set the top property to 0 to specify that the element should stick at the top of the viewport.
html

index

css

index

js

index

Everything was clear?

Section 2. Chapter 9
We're sorry to hear that something went wrong. What happened?
some-alt