Skip to content

CSS: size units #6

@mkermani144

Description

@mkermani144

Description

Create a webpage with the following elements:

  • A: 300px in width, 100px in height
  • B: 40% of the page width, 200px in height
  • C: 100x the element font-size (e.g. if the element has font-size of 12px, it should be 1200px in width), 30x the root element font-size (e.g. if root element has font-size of 12px, it should be 360px)
  • D: child of A, 40% of parent width, 30% of parent height
  • F: 30% of the viewport larger dimension in width, 20% of the viewport smaller dimension in height

Give each element a unique color so it can be distinguished from others.

What to google

  • css values and units
  • px, em, rem, vh, vw, vmin, vmax, percents

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions