diff --git a/index.css b/index.css new file mode 100644 index 0000000..0fd1dab --- /dev/null +++ b/index.css @@ -0,0 +1,211 @@ +/* div{ + background-color: red; +} */ +body, ul, li, h1, h2, a{ + margin: 0; + padding: 0; + font-family: Arial; +} +header{ + background-color: red; + padding: 20px; + text-align: center; + position: fixed; + width: 100%; + z-index: 1; + top: 0; + left: 0; +} +header h1{ + color: white; + border: 8px solid white; + padding: 6px 12px; + display: inline-block; + border-radius: 36px; +} +.banner{ + position: relative; + +} +.banner img{ + max-width: 100%; +} +.banner .welcome{ + background-color: orange; + color: white; + position: absolute; + padding: 30px; + left: 0; + top: 30%; +} +.banner h2{ + font-size: 74px; +} +.banner h2 span{ + font-size: 1.3em; + /*we can't use px for this as wehn we hover the sixe does not chage, but on using % it can hover with the image; */ +} +nav{ + background-color: #f4f4f4; + padding: 20px; + position: sticky; + top: 104px; + text-align: center; +} +nav ul{ + white-space: nowrap; + max-width: 1200px; + margin: 0 auto; +} +nav li{ + width: 25%; + display: inline-block; + font-size: 24px; +} +nav li a{ + text-decoration: none; + color: #484844; +} +nav li a.join{ + color: red; +} +main{ + max-width: 100%; + width: 1200px; + margin: 80px auto; + padding: 0 40px; + box-sizing: border-box; +} +article h2{ + color: red; + font-size: 48px; +} +article p{ + line-height: 2em; + color: #4b4b44; + text-align: justify; +} +.images{ + text-align: center; + margin: 80px 0; + white-space: nowrap; +} +.images li{ + display: inline-block; + width: 40%; + margin: 20px 5%; +} +.images li img{ + max-width: 100%; +} +section.join{ + background: whitesmoke; + text-align: center; + padding: 60px 40px; + color: #4b4b44; +} +.join h2{ + font-size: 36px; +} +form input{ + margin: 20px 0; + padding: 10px 20px; + font-size: 24px; + border-radius: 20px; + border: 4px solid white; +} +footer{ + background: red; + color: white; + padding: 10px; + text-align: center; +} + +/* pseudo classes */ +nav li a:hover{ +text-decoration: underline; +} +.images li{ + top: -4px; + /* hover pseudo class */ +} +form input:focus{ +border: 4px dashed #4b4b44; +outline: none; +} +form input:valid{ + border: 4px solid lightgreen; +} +/* nav li:first-child{ + border: apx solid red; + w3schools.com +} */ +article p::first-line{ + font-weight: bold; + font-size: 1.3em; +} +section.join p::first-letter{ + font-size: 1.5em; +} +p::selection{ + background-color: red; + color: white; +} +p::after{ + content: "...x"; +} +@media screen and (max-width: 1400px){ + + .banner .welcome h2{ + font-size: 60px; + } + nav li{ + font-size: 18px; + } + +} +@media screen and (max-width: 960px){ + + .banner .welcome h2{ + font-size: 40px; + } + +} +@media screen and (max-width: 700px){ + + .banner .welcome{ + position: relative; + text-align: center; + padding: 10px; + } + .banner .welcome br{ + display: none; + + } + .banner .welcome h2{ + font-size: 25px; + } + .banner .welcome span{ + font-size: 1em; + } + .images li{ + width: 100%; + margin: 20px auto; + display: block; + } +} +@media screen and (max-width: 560px){ +nav li{ + font-size: 20px; + display: block; + width: 100%; + margin: 12px auto; + text-align: initial; +} +header{ + position: relative; +} +nav{ + top: 0px; +} +}