Professional Documents
Culture Documents
Task 4: Search-Filter - Css
Task 4: Search-Filter - Css
search-filter.css:
.searchFilter {
margin-bottom: 20px;
}
.searchFilter.btn {
display: inline-block;
font-weight: 400;
line-height: 1.25;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: 1px solid transparent;
padding: .5rem 1rem;
font-size: 16px;
border-radius: .25rem;
height: 50px;
min-width: 20px;
}
.searchFilter .btn-secondary {
color: #373a3c;
background-color: #fff;
border: 1px solid black;
}
.searchFilter .btn-secondary:hover {
color: #373a3c;
background-color: #e6e6e6;
border-color: black;
}
.searchFilter .btn-search {
background-color: red;
color: #fff;
border: 1px solid black;
}
.searchFilter .btn-search:hover {
background-color: #b20a11;
color: #fff;
border: 1px solid black;
}
.searchFilter .label-icon {
display: none;
}
.searchFilter .glyphicon {
margin-right: -15px;
}
.searchFilter .dropdown-menu .category_filters {
min-width: 178px;
width: 100%;
margin: 15px 0 0 -25px;
}
.searchFilter .dropdown-menu-right {
right: 170px;
min-width: 175px;
top: 90%;
}
.searchFilter .dropdown-menu .category_filters li {
list-style-type: none;
padding: 2px 10px;
font-size: 18px;
}
.searchFilter .dropdown-menu .category_filters label {
margin-left: 15px;
}
@media (min-width: 1400px) {
.ct-header .ct-jumbotron .inner {
max-width: 470px;
min-height: 230px;
}
}
@media (max-width: 1400px) {
.ct-header-slider .item {
background-size:contain;
background-repeat: no-repeat;
background-position: center top;
}
}
@media (min-width: 769px) and (max-width: 1400px) {
.ct-header-slider .item {
height: auto;
}
}
@media (max-width: 1260px) {
#dots-container {
display: none;
}
}
@media (min-width: 992px){
.ct-footer2 .ct-newsletter {
max-width: 100%;
}
#dots-container {
bottom: 100px;
}
}
@media (min-width: 768px){
.ct-searchbar:before {
height: 92px;
bottom: -1px;
}
.page-scrolled .navbar .navbar-nav li > * {
min-height: 67px;
height: 67px;
}
.page-scrolled .navbar .navbar-nav {
height: 100%!important;
}
.ct-current-facts h2 {
margin: 0 auto 0px;
}
.contentNews .ct-recent-news {
flex-direction: inherit;
}
.contentFaq .faq_question .col-sm-11 {
padding-right: 0px;
}
.peopleDetail h2 {
margin-top: -5px;
}
.searchFilter .btn {
min-width: 172px;
}
.searchFilter .label-icon {
display: inline-block;
}
.searchFilter .glyphicon {
margin-right: -5px;
}
.ct-header .ct-jumbotron {
top: 0;
margin-top: 5%;
}
.ct-header .ct-jumbotron h1 {
font-size: 2.5em;
}
.ct-news.ct-news--bigger h3 {
font-size: 41px;
line-height: 1.4;
}
}
@media (max-width: 768px){
.ct-header .ct-jumbotron {
width: 80%;
margin: 20px 10px;
top: 40%;
width: 95%;
}
.ct-header .ct-jumbotron .inner {
max-width: 100%;
}
#dots-container {
display: none;
}
.main-section {
margin-top: -80px;
}
.searchFilter .dropdown-menu-right {
right: 0px;
}
}
signup.css:
.signup-form {
max-width: 400px;
margin: 0 auto;
padding: 20px;
background-color: mediumaquamarine;
border-radius: 5px;
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.3);
}
.total{
background-color: black;
}
h2 {
text-align: center;
margin-bottom: 20px;
}
form {
display: flex;
flex-direction: column;
}
label {
font-weight: bold;
margin-bottom: 5px;
}
input[type="text"],
input[type="email"],
input[type="password"],
select,
button[type="submit"] {
padding: 10px;
margin-bottom: 20px;
border-radius: 5px;
border: none;
}
input[type="date"] {
padding: 10px;
margin-bottom: 20px;
border-radius: 5px;
border: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: white;
background-image: url('https://cdn4.iconfinder.com/data/icons/web-ui-color/128/Calendar-512.png');
background-position: right center;
background-repeat: no-repeat;
background-size: 20px;
}
button[type="submit"] {
background-color: #4CAF50;
color: white;
cursor: pointer;
transition: background-color 0.3s ease;
}
button[type="submit"]:hover {
background-color: #2E8B57;
}
style.css:
* {
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
margin: 0;
}
button{
background-color: crimson;
color: #fff;
border: transparent;
size: 30px;
font-size: 16px;
cursor: pointer;
}
footer{
background-color: crimson;
color: white;
text-decoration: none;
}
header {
background-color: crimson;
color: #fff;
padding: 20px;
}
header h1 {
margin: 0;
}
nav {
display: inline-block;
float: right;
}
nav ul {
list-style: none;
margin: 0;
padding: 0;
}
nav li {
display: inline-block;
margin-right: 20px;
}
nav a {
color: #fff;
text-decoration: none;
}
main {
margin: 20px;
}
main h2 {
font-size: 36px;
}
.books-container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.book {
border: 2px solid #ccc;
margin-bottom: 20px;
padding: 20px;
width: calc(33.33% - 20px);
}
.book img {
display: block;
margin: 0 auto;
max-width: 100%;
}
.book h3 {
font-size: 24px;
margin-top: 10px;
}
.book p {
margin: 10px 0;
}
.book button {
background-color: #333;
border: none;
color: #fff;
cursor: pointer;
display: block;
}
#slideshow {
position: relative;
width: 100%;
height: 400px;
overflow: hidden;
}
.slideshow img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 1s ease-in-out;
}
#slideshow img.active {
opacity: 1;
}
.searchFilter {
margin-bottom: 20px;
}
.searchFilter.btn {
display: inline-block;
font-weight: 400;
line-height: 1.25;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: 1px solid transparent;
padding: .5rem 1rem;
font-size: 16px;
border-radius: .25rem;
height: 50px;
min-width: 20px;
}
.searchFilter .btn-secondary {
color: #373a3c;
background-color: #fff;
border: 1px solid #ccc;
}
.searchFilter .btn-secondary:hover {
color: #373a3c;
background-color: #e6e6e6;
border-color: #adadad;
}
.searchFilter .btn-search {
background-color: #00aced;
color: #fff;
border: 1px solid #00aced;
}
.searchFilter .btn-search:hover {
background-color: #b20a11;
color: #fff;
border: 1px solid #b20a11;
}
.searchFilter .label-icon {
display: none;
}
.searchFilter .glyphicon {
margin-right: -15px;
}
.searchFilter .dropdown-menu .category_filters {
min-width: 178px;
width: 100%;
margin: 15px 0 0 -25px;
}
.searchFilter .dropdown-menu-right {
right: 170px;
min-width: 175px;
top: 90%;
}
.searchFilter .dropdown-menu .category_filters li {
list-style-type: none;
padding: 2px 10px;
font-size: 18px;
}
.searchFilter .dropdown-menu .category_filters label {
margin-left: 15px;
}
@media (min-width: 1400px) {
.ct-header .ct-jumbotron .inner {
max-width: 470px;
min-height: 230px;
}
}
@media (max-width: 1400px) {
.ct-header-slider .item {
background-size:contain;
background-repeat: no-repeat;
background-position: center top;
}
}
@media (min-width: 769px) and (max-width: 1400px) {
.ct-header-slider .item {
height: auto;
}
}
@media (max-width: 1260px) {
#dots-container {
display: none;
}
}
@media (min-width: 992px){
.ct-footer2 .ct-newsletter {
max-width: 100%;
}
#dots-container {
bottom: 100px;
}
}
@media (min-width: 768px){
.ct-searchbar:before {
height: 92px;
bottom: -1px;
}
.page-scrolled .navbar .navbar-nav li > * {
min-height: 67px;
height: 67px;
}
.page-scrolled .navbar .navbar-nav {
height: 100%!important;
}
.ct-current-facts h2 {
margin: 0 auto 0px;
}
.contentNews .ct-recent-news {
flex-direction: inherit;
}
.contentFaq .faq_question .col-sm-11 {
padding-right: 0px;
}
.peopleDetail h2 {
margin-top: -5px;
}
.searchFilter .btn {
min-width: 172px;
}
.searchFilter .label-icon {
display: inline-block;
}
.searchFilter .glyphicon {
margin-right: -5px;
}
.ct-header .ct-jumbotron {
top: 0;
margin-top: 5%;
}
.ct-header .ct-jumbotron h1 {
font-size: 2.5em;
}
.ct-news.ct-news--bigger h3 {
font-size: 41px;
line-height: 1.4;
}
}
@media (max-width: 768px){
.ct-header .ct-jumbotron {
width: 80%;
margin: 20px 10px;
top: 40%;
width: 95%;
}
.ct-header .ct-jumbotron .inner {
max-width: 100%;
}
#dots-container {
display: none;
}
.main-section {
margin-top: -80px;
}
.searchFilter .dropdown-menu-right {
right: 0px;
}
}
style_main.css:
:root {
/* Primary */
--orange: hsl(26, 100%, 55%);
--pale-orange: hsl(25, 100%, 94%);
/* Neutral */
html {
font-size: 62.5%;
box-sizing: border-box;
}
*,
*::before,
*::after {
padding: 0;
margin: 0;
box-sizing: inherit;
}
/*/////////////
Main CSS
//////////////*/
body {
font-family: "Kumbh Sans", sans-serif;
position: relative;
}
.body-wrapper {
position: absolute;
z-index: 50;
}
/*/////////////
Overlay image modal
//////////////*/
.overlay-container {
display: none;
z-index: 1000;
width: 100%;
height: 100%;
position: fixed;
background-color: rgba(0, 0, 0, 0.5);
}
.item-overlay {
max-width: 50rem;
padding-top: 5rem;
margin: auto;
display: flex;
flex-direction: column;
gap: 2.5rem;
}
.item-overlay__btn {
align-self: flex-end;
background: none;
border: none;
filter: invert(52%) sepia(14%) saturate(3126%) hue-rotate(344deg)
brightness(107%) contrast(102%);
cursor: pointer;
}
.item-overlay__mainImg {
position: relative;
}
.item-overlay__img {
align-self: center;
width: 100%;
height: 100%;
border-radius: 5%;
}
.overlay-btn {
position: absolute;
top: 50%;
padding: 1.6rem 2rem;
border: none;
border-radius: 50%;
background-color: var(--white);
cursor: pointer;
}
.item-overlay__btnlft-img {
transform: rotate(180deg);
}
.overlay-btn:hover .overlay-btn__img {
filter: invert(52%) sepia(14%) saturate(3126%) hue-rotate(344deg)
brightness(107%) contrast(102%);
}
.item-overlay__btnlft {
left: 0;
transform: translateX(-50%);
}
.item-overlay__btnrgt {
right: 0;
transform: translateX(50%);
}
.overlay-img__btns {
align-self: center;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 2rem;
}
.overlay-img__btn {
display: block;
cursor: pointer;
background: none;
border: none;
border-radius: 10%;
transition: all 0.3s;
position: relative;
}
.overlay-img__btn::after {
content: "";
max-width: 100%;
height: 100%;
background-color: var(--white);
border-radius: 10%;
border: 3px solid transparent;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
opacity: 0;
}
.overlay-img__btn:hover {
background-color: var(--orange);
}
.overlay-img__btn:hover::after {
border: 3px solid var(--orange);
opacity: 0.5;
}
.overlay-img__btn-img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 10%;
transition: all 0.3s;
transform-origin: bottom;
}
/*/////////////
Header
//////////////*/
.head {
max-width: 80%;
padding-top: 5rem;
margin: 0 auto 15rem;
display: flex;
justify-content: space-between;
position: relative;
}
.head::after {
content: "";
height: 0.1px;
width: 100%;
background-color: var(--grayish-blue);
position: absolute;
bottom: -5rem;
left: 0;
margin-top: 5rem;
}
.head-lft {
display: flex;
align-items: center;
gap: 2.5rem;
}
.head-lft__btn {
display: none;
padding-top: 0.9rem;
}
.head-nav {
list-style: none;
font-size: 1.7rem;
color: var(--dark-grayish-blue);
display: flex;
gap: 2.25rem;
}
.head-nav__item {
position: relative;
cursor: pointer;
}
.head-nav__item::after {
content: "";
position: absolute;
bottom: -6.8rem;
left: 0;
height: 3px;
width: 100%;
transform: scale(0);
background-color: var(--orange);
transition: transform 0.3s;
transform-origin: center;
}
.head-nav__item:hover::after {
transform: scale(1);
}
.head-nav__btn {
display: none;
}
.head-rgt {
display: flex;
gap: 5rem;
position: relative;
}
.head-rgt::after {
content: attr(data-content);
height: 1.7rem;
width: 2.7rem;
padding: 0.1rem 0.15rem;
font-size: 1.25rem;
font-weight: 700;
color: var(--white);
text-align: center;
border-radius: 10px;
background-color: var(--orange);
position: absolute;
top: -0.5rem;
left: -1rem;
display: var(--display, none);
}
.head-rgt__img {
height: 5.5rem;
width: 5.5rem;
border-radius: 100px;
border: 0.3rem solid transparent;
cursor: pointer;
}
.head-rgt__img:hover {
border: 0.3rem solid var(--orange);
}
.head-rgt__btn {
background: none;
border: none;
cursor: pointer;
}
/* Btn stylling */
.btn--orange {
padding: 2rem 5rem;
font-size: 1.5rem;
font-weight: 700;
color: var(--white);
background-color: red;
border: none;
border-radius: 1rem;
cursor: pointer;
}
/* //////////////////
Cart stylling
/////////////////////// */
.head-cart {
z-index: 100;
padding: 3rem 2rem;
width: 36rem;
background-color: var(--white);
box-shadow: 0px 10px 25px 3px rgba(0, 0, 0, 0.5);
border-radius: 1rem;
position: absolute;
top: 15%;
right: 15%;
display: flex;
flex-direction: column;
gap: 4rem;
visibility: hidden;
}
.head-cart__heading {
position: relative;
font-size: 1.5rem;
}
.head-cart__heading::before {
content: "";
width: 112.5%;
height: 1px;
background-color: var(--grayish-blue);
position: absolute;
top: 3.5rem;
left: -2rem;
}
.head-cart__txt {
font-size: 1.5rem;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
visibility: hidden;
}
.head-cart__btn {
align-self: center;
width: 100%;
}
.head-cart__item-wrapper {
display: flex;
align-items: start;
gap: 2.5rem;
}
.head-cart__item {
display: flex;
flex-direction: column;
gap: 2rem;
visibility: hidden;
}
.head-cart__item-img {
width: 5rem;
height: 5rem;
border-radius: 0.5rem;
}
.head-cart__item-btn {
align-self: center;
background: none;
border: none;
cursor: pointer;
}
.head-cart__des {
flex-shrink: 0;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.head-cart__des-txt {
font-size: 1.5rem;
line-height: 1.5;
}
.head-cart__price {
display: flex;
gap: 1rem;
font-size: 1.5rem;
}
.head-cart__price-total {
font-weight: 700;
}
/* //////////////////
Product section stylling
/////////////////////// */
.item {
padding: 0 3rem;
max-width: 134rem;
margin: auto;
display: grid;
grid-template-columns: 0.8fr 1fr;
gap: 10rem;
}
.img-main__btn {
display: none;
}
.img-btns {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 2rem;
}
.img-btn {
display: block;
cursor: pointer;
background: none;
border: none;
border-radius: 10%;
transition: all 0.3s;
position: relative;
}
.img-btn::after {
content: "";
max-width: 100%;
height: 100%;
background-color: var(--white);
border-radius: 10%;
border: 3px solid transparent;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
opacity: 0;
}
.img-btn:hover {
background-color: var(--orange);
}
.img-btn:hover::after {
border: 3px solid var(--orange);
opacity: 0.5;
}
.img-btn__img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 10%;
border: 3px solid transparent;
transition: all 0.3s;
transform-origin: bottom;
}
.price-sub__heading {
text-transform: uppercase;
letter-spacing: 1.5px;
font-size: 1.5rem;
font-weight: 700;
color: var(--orange);
}
.price-main__heading {
font-size: 5rem;
font-weight: 700;
}
.price-txt {
margin-top: 2rem;
font-size: 1.8rem;
color: var(--dark-grayish-blue);
line-height: 1.5;
}
.price-box {
display: flex;
flex-direction: column;
gap: 2.5rem;
}
.price-box__main {
display: flex;
gap: 1rem;
align-items: center;
}
.price-box__main-new {
font-size: 3.5rem;
font-weight: 700;
}
.price-box__main-discount {
border: none;
padding: 0.5rem 1.25rem;
background-color: var(--pale-orange);
border-radius: 0.5rem;
font-size: 1.7rem;
font-weight: 700;
color: var(--orange);
}
.price-box__old {
font-size: 1.5rem;
color: var(--grayish-blue);
position: relative;
}
.price-box__old::after {
content: "";
height: 1px;
width: 9%;
background-color: var(--grayish-blue);
position: absolute;
left: 0;
top: 50%;
}
.price-btnbox {
margin-top: 2rem;
}
.price-btnbox {
display: flex;
gap: 2.5rem;
}
.price-btns {
width: 30%;
padding: 1.5rem 1.25rem;
border: none;
background-color: var(--light-grayish-blue);
border-radius: 1rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 3.5rem;
}
.price-btn {
border: none;
background: none;
cursor: pointer;
height: 100%;
}
.price-btn__txt {
font-size: 1.7rem;
font-weight: 700;
}
.price-cart__btn {
width: 50%;
box-shadow: 0px 10px 25px 3px red (255, 125, 26, 0.5);
display: flex;
justify-content: center;
align-items: center;
gap: 1.5rem;
}
/* Attribution */
.attribution {
margin-top: 7rem;
font-size: 11px;
text-align: center;
}
.attribution a {
color: hsl(228, 45%, 44%);
}
/*/////////////
Media Queries
//////////////*/
@media only screen and (max-width: 1600px) {
.head {
max-width: 100%;
margin-left: 3rem;
margin-right: 3rem;
}
.head-cart {
right: 10%;
}
}
.price {
margin-top: 0.5rem;
}
.head {
max-width: 100%;
margin-left: 3rem;
margin-right: 3rem;
}
}
.head {
position: unset;
max-width: 100%;
margin-top: 0;
margin-bottom: 5rem;
}
.head::after {
display: none;
}
.head-nav__item::after {
display: none;
}
.item {
padding: 0;
grid-template-columns: 1fr;
gap: 5rem;
}
.img {
position: relative;
}
.img-main {
border-radius: 0;
}
.img-main__btn {
display: block;
position: absolute;
top: 50%;
transform: translateY(-50%);
padding: 2rem 2.6rem;
border: none;
border-radius: 100px;
cursor: pointer;
}
.img-main__btn:hover .img-main__btn-img {
filter: invert(52%) sepia(14%) saturate(3126%) hue-rotate(344deg)
brightness(107%) contrast(102%);
}
.img-main__btnlft {
left: 10%;
}
.img-main__btnlft-img {
transform: rotate(180deg);
}
.img-main__btnrgt {
right: 10%;
}
.img-btns {
display: none;
}
.price {
padding: 0 3rem;
}
.price-btnbox {
flex-direction: column;
}
.price-btns {
padding: 3rem 5rem;
width: 100%;
}
.price-cart__btn {
padding: 3rem 5rem;
width: 100%;
}
.price-box {
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.price-box__old::after {
width: 100%;
}
/* nav */
.head-lft__btn {
display: block;
background: none;
border: none;
position: relative;
z-index: 100;
cursor: pointer;
}
.head-nav {
z-index: 99;
position: absolute;
left: 0;
top: 0;
flex-direction: column;
gap: 5rem;
padding: 15rem 0 0 3rem;
background-color: var(--white);
width: 55%;
height: 100%;
transform: translateX(-100%);
transition: transform 1s;
}
.head-nav__item {
text-transform: uppercase;
font-size: 2rem;
font-weight: 700;
color: var(--very-dark-blue);
}
.head-nav__btn {
width: 0;
display: block;
background: none;
border: none;
margin-bottom: 2.5rem;
}
/* Cart */
.head-cart {
top: 10%;
right: 15%;
}
}
.price-main__heading {
font-size: 3.5rem;
}
.price-box__main-new {
font-size: 3rem;
}
.head-lft {
gap: 1.5rem;
}
.head-rgt {
gap: 1.5rem;
}
}
/*/////////////
JavaScript Triggered Classes
//////////////*/
.open-cart {
visibility: visible;
}
.open-menu {
transform: translateX(0%);
}
.open-overlay {
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.preload * {
transition: none !important;
}