Create a stylish calendar for the month.
Use CSS Flexbox and more to create a stylish calendar.
To complete this project, students should have the following:
- Intermediate understanding of HTML elements (divs, images, attributes, structure...etc.)
- Intermediate understanding of CSS (Flexbox, margin, padding...etc.)
To complete Part I, fulfill the following requirements:
- Set up your file structure through the command line:
- index.html
- styles.css
- Link your CSS file to your index.html file.
To complete Part II, fulfill the following requirements:
- Create your HTML elements with this nested structure as follows:
divwith id of "container"divwith id of "section1"divwith id of "year" and text of 2018divwith id of "title-container"h1with text of "DEC" (short for December)
divwith id of "section2"divwith id of "top-title"h3with text of "DECEMBER 2018"
divwith id of "calendar"-
divwith id of "weeks" and class of "row"pwith text of "S"pwith text of "M"pwith text of "T"pwith text of "W"pwith text of "T"pwith text of "F"pwith text of "S"
-
divwith class of "row"pwith class of "oth-mo" (short for other month) and text of "25"pwith class of "oth-mo" and text of "26"pwith class of "oth-mo" and text of "27"pwith class of "oth-mo" and text of "28"pwith class of "oth-mo" and text of "29"pwith class of "oth-mo" and text of "30"pwith text of "1"
-
divwith class of "row"pwith text of "2"pwith text of "3"pwith text of "4"pwith text of "5"pwith text of "6"pwith text of "7"pwith text of "8"
-
divwith class of "row"pwith text of "9"pwith text of "10"pwith text of "11"pwith text of "12"pwith text of "13"pwith text of "14"pwith text of "15"
-
divwith class of "row"pwith text of "16"pwith text of "17"pwith text of "18"pwith text of "19"pwith text of "20"pwith text of "21"pwith text of "22"
-
divwith class of "row"pwith text of "23"pwith text of "24"pwith text of "25"pwith text of "26"pwith text of "27"pwith text of "28"pwith text of "29"
-
To complete Part III, fulfill the following requirements:
Go to Google fonts and add the Lato and Oswald fonts to your HTML file.
- Target the
bodyelement.
- Set its margin to 0px
- Target the
idof "container".
- Set the width to 100%
- Set the height to
calc(100vh) - Activate flexbox!
- Use flexbox to set the direction of elements to a row.
- Target the
idof "year".
- Set the color to white
- Set the
font-familyto'Oswald', sans-serif - Set the size of the font to 30px
- Set the background color to
rgb(50,50,50) - Set the height to 10%
- Activate flexbox!
- Use flexbox to center the items horizontally and vertically
- Set the
letter-spacingto 3px
- Target the
idof "section1" {
- Set the width to 40%
- Set the height to 100%
- Set the background color to
rgb(30,30,30)
- Target the
h1element of#section1
- Set the font family to
'Oswald', sans-serif - Set the font size to 200px
- Set the color to white
- Target the
h3element of#section1
- Set the font-family to
'Oswald', sans-serif - Set the font size to 50px
- Set the color to white
- Set the padding to 0px
- Target the
idof "section2"
- Set the width to 60%
- Set the height to 100%
- Target the
idof "title-container"
- Set the width to 100%
- Set the height to 80%
- Activate flexbox!
- Use flexbox to center items horizontally and vertically
- Use flexbox to set the direction of items to a column
- Target the
idof "weeks"
- Set the color to
#3b9789 - Set the
font-weightto bold
- Target the
idof "top-title"
- Set the width to 100%
- Set the height to 10%
- Set the font-family to Oswald
- Set the letter spacing to 2px
- Activate flexbox!
- Use flexbox to center items horizontally and vertically
- Use flexbox to set the direction of items to a column
- Target the
idof "calendar"
- Set the width to 100%
- Set the height to 80%
- Activate flexbox!
- Use flexbox to center items horizontally and vertically
- Use flexbox to set the direction of items to a column
- Target the
classof "row"
- Set the width to 100%
- Activate flexbox!
- Use flexbox to set the direction of elements to a row
- Use flexbox to evenly give horizontal space around each element
- Target the
pelements of.row
- Set the width to 50px
- Set the height to 50px
- Set the font family to Lato
- Set the padding to 0px
- Activate flexbox!
- Use flexbox to center items horizontally and vertically
- Target the
classof "oth-mo"
- Set the color to
rgb(120,120,120)
- Mark special days for this month by applying a class to those days and styling them in CSS!
- Super Stretch: Use click events to add notes to a day on click. Resources:
- EventListeners: https://www.w3schools.com/js/js_htmldom_eventlistener.asp
- Appending Elements: https://www.w3schools.com/jsref/met_node_appendchild.asp
- Get User Input: https://www.w3schools.com/tags/tag_input.asp
