mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
4 years ago | |
---|---|---|
.. | ||
README.md | 4 years ago |
README.md
Select & style
Now that you created & identified properly the different elements of your being, it's time to make it look more living-like! To achieve that, you're going to style it with CSS.
Create a CSS file, link it to your index.html
, and :
- target all the elements with the universal selector and style them with an
opacity
of 0.8 - target all the
section
tags with the type selector, and style it with apadding
of 20 pixels and amargin
of 15 pixels - target each following element with the
id
selector, using theid
you defined earlier for each section, and style it:face
with awidth
&height
of 80 pixels, and a "lime"background-color
upper-body
with awidth
of 200 pixels, aheight
of 220 pixels, and a "deeppink"background-color
lower-body
with awidth
of 100 pixels, aheight
of 220 pixels, and a "yellow"background-color
- target the
body
tag and style it with adisplay
at "flex", aflex-direction
at "column" and aalign-items
at "center" (this is to turn thebody
into aflex
container, so the elements will be centered in the page)
To style an element, you systematically have to declare rulesets, composed of a property and a value.
Here is an exemple of how to set the color of div
tags to "red":
color: red;
}