Answers for "css for tourism website"

0

css for tourism website

@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Satisfy&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
}

body,
html {
  margin: 0;
  padding: 0;
}

/*------------------------Scroll Bar-----------------------*/
::-webkit-scrollbar {
  width: 20px;
}

::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px grey;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: #fde65e;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #fde02f;
}

/*========================Nav Bar=========================*/
.nav-bar {
  display: flex;
  flex-flow: row wrap;
  width: 100%;
  height: 90px;
  background-color: #fff;
  box-shadow: 3px 3px 10px lightslategray;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 1;
}

.logo {
  flex: 1;
  font-size: 40px;
  padding: 20px;
  margin-left: 50px;
  font-family: Satisfy;
}

ul.menu {
  flex: 1;
  display: flex;
  flex-flow: row wrap;
}

.menu li {
  flex: 1;
  list-style-type: none;
  font-size: 16px;
  font-family: "Barlow Condensed";
  text-align: center;
}

.menu li a {
  text-decoration: none;
  color: #000;
  text-transform: uppercase;
}

.menu li a:hover {
  color: midnightblue;
  text-decoration: underline;
}

/*=============================Banner=============================*/
.banner {
  background-image: url("https://res.cloudinary.com/dxssqb6l8/image/upload/v1605294054/young-woman-enjoying-beautiful-scenery-of-lago-di-braies-italy-picjumbo-com_aa0fvw.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  /*overflow: hidden;*/
  width: 100%;
  height: 100vh;
  text-align: center;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.banner::before {
  content: "";
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.2);
  /*background-size: 100%;*/
}

.banner-text-item {
  position: absolute;
  width: 100%;
  text-align: center;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
}

.banner-heading {
  flex: 1;
}

.banner-heading h1 {
  font-size: 100px;
  font-weight: normal;
  color: #fde02f;
  font-family: Satisfy;
}

.banner-text-item .form {
  flex: 1;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  width: 70%;
  padding: 1% 2%;
}

.banner-text-item input,
.banner-text-item .date,
.banner-text-item .book {
  padding: 15px;
  margin-right: 10px;
  font-size: 18px;
  font-family: Roboto;
  border-radius: 5px;
  outline: 0;
  border: none;
}

.banner-text-item input {
  width: 50%;
  flex: 2;
}

.banner-text-item .date {
  width: 20%;
  flex: 1;
}

.banner-text-item .book {
  width: 20%;
  flex: 1;
}

.banner-text-item .book {
  text-decoration: none;
  color: #000;
  text-transform: uppercase;
  padding: 15px;
  cursor: pointer;
  background-color: #fde02f;
  font-size: 16px;
  font-weight: normal;
  font-family: "Barlow Condensed";
  width: 20%;
}

/*===========================Services===========================*/
.services {
  display: flex;
  flex-flow: row;
  align-items: center;
  justify-content: center;
}

.service-item {
  flex: 1;
  padding: 50px 10px;
  border: lightcyan solid 1px;
  text-align: center;
  margin: 180px 50px;
  transition: all 1s;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
}

.service-item:hover {
  box-shadow: 3px 3px 20px lightsteelblue;
}

.service-item h2 {
  font-family: Barlow Condensed;
  font-size: 18px;
  width: 120px;
  color: #001f38;
  flex: 1;
}

.service-item img {
  width: 60px;
  height: 60px;
  flex: 1;
}

/*=============================Places===============================*/
.places-text {
  text-align: center;
  margin-bottom: 50px;
}

.places-text small {
  font-family: Roboto;
  color: #ffc342;
  font-size: 15px;
  font-weight: bolder;
}

.places-text h2 {
  font-family: Barlow Condensed;
  font-size: 55px;
  color: #191d34;
  letter-spacing: 1px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-gap: 30px;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.card {
  border: 1px solid lightgray;
  box-shadow: 2px 2px 6px 0 rgba(0, 0, 0, 0.3);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  width: 80%;
  height: auto;
}

.card img {
  max-width: 100%;
  height: 300px;
  border-radius: 8px;
  cursor: pointer;
}

.cards .text {
  padding: 20px;
  font-family: Barlow Condensed;
  line-height: 50px;
}

.cards .card-box {
  display: flex;
  flex-flow: row;
  background-color: #fde02f;
  font-size: 18px;
  font-family: Roboto;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cards .time {
  flex: 1;
}

.cards .location {
  flex: 2;
}

.cards .cost {
  color: #4cafad;
  font-size: 20px;
}

/*------------Zoom in Photos--------------*/
.zoom-img {
  float: left;
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
}

.zoom-img .img-card {
  position: absolute;
  overflow: hidden;
}

.img-card img {
  -webkit-transition: 0.8s ease;
  transition: 0.8s ease;
}

.card:hover .zoom-img img {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

/*=========================About Us=========================*/
.about {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  padding: 150px;
}

.about-img {
  flex: 1;
}

.about-img img {
  width: 500px;
  height: 700px;
  box-shadow: 2px 2px 6px 0 rgba(0, 0, 0, 0.3);
}

.about-text {
  flex: 1;
  /*width: 100px;*/
  display: flex;
  flex-flow: column wrap;
}

.about-text small,
.about-text p,
.about-text input,
.about-text a {
  flex: 1;
  font-family: Roboto;
}

.about-text small {
  color: #ffc342;
  font-size: 18px;
}

.about-text h2 {
  flex: 1;
  font-family: Barlow Condensed;
  font-size: 60px;
  color: #191d34;
  width: 450px;
}

.about-text label {
  padding-bottom: 10px;
  color: #506172;
  font-weight: bolder;
  font-family: Roboto;
  letter-spacing: 1px;
}

.about-text p {
  width: 500px;
  line-height: 30px;
  color: #506172;
  font-weight: bolder;
  padding: 50px 0;
}

.about-text a {
  background-color: #fff;
  border: 2px solid #014b85;
  text-decoration: none;
  border-radius: 5px;
  width: 180px;
  padding: 20px;
  text-align: center;
  margin-top: 50px;
  color: #014b85;
  font-weight: bolder;
  font-size: 14px;
}

.about-text a:hover {
  background-color: #014b85;
  color: #fff;
}

/*===============Footer===================*/
.footer {
  background-image: url("https://res.cloudinary.com/dxssqb6l8/image/upload/v1605293781/pine-tree_mq2sgp.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: 670px;
  position: relative;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
}

.footer::before {
  position: absolute;
  content: "";
  display: block;
  background-color: rgba(0, 0, 36, 0.8);
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.footer .links {
  position: relative;
  color: #fff;
  flex: 1;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
}

.links ul {
  list-style-type: none;
}

.links h3 {
  font-family: Barlow Condensed;
  font-weight: normal;
  font-size: 23px;
  margin-bottom: 15px;
}

.links li {
  font-family: Roboto;
  cursor: pointer;
  padding: 15px 0;
}

.links li:hover {
  color: #ffa801;
}

/*==========================Responsive=============================*/
@media all and (max-width: 1172px) {
  .banner-text-item .form {
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    width: 50%;
  }

  .banner-text-item .form input,
  .banner-text-item .form .date,
  .banner-text-item .form a {
    flex: 1;
    margin-bottom: 5px;
    font-size: 14px;
  }

  .banner-text-item .form input {
    width: 60%;
  }

  .banner-text-item .form .date {
    width: 30%;
  }

  .banner-text-item .form .book {
    width: 10%;
    font-size: 14px;
  }

  .banner-heading h1 {
    font-size: 60px;
  }
}

@media all and (max-width: 1414px) {
  .banner-text-item .form input {
    width: 40%;
  }

  .banner-text-item .form .date {
    width: 30%;
  }

  .banner-text-item .form .book {
    width: 20%;
    font-size: 14px;
  }
}

@media all and (max-width: 942px) {
  .nav-bar {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    text-align: center;
    position: static;
  }

  .logo {
    flex: 1;
    font-size: 30px;
    margin: 10px auto;
    font-family: Satisfy;
    color: #fde02f;
  }

  .nav-bar ul {
    display: none;
  }

  .nav-bar ul li {
    flex: 1;
    margin-bottom: 5px;
    font-size: 14px;
  }

  .services {
    display: flex;
    flex-flow: column wrap;
  }

  .services .service-item {
    flex: 1;
    margin-bottom: -130px;
    width: 400px;
  }

  .places-text {
    margin-top: 200px;
  }
}

@media all and (max-width: 928px) {
  .banner .form input,
  a {
    font-size: 12px;
  }
}

@media all and (max-width: 1173px) {
  .banner .form {
    background-color: transparent;
  }
}

@media all and (max-width: 1194px) {
  .places .card-box p {
    font-size: 14px;
  }
}

@media all and (max-width: 1086px) {
  .places .cards .text {
    line-height: 40px;
  }

  .cards .text .h2 {
    font-size: 12px;
  }

  .cards .img-card img {
    height: 260px;
  }
}

@media all and (max-width: 974px) {
  .cards {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(6, 1fr);
    grid-gap: 20px;
  }

  .card {
    width: 300px;
    height: 500px;
    margin: auto;
  }

  .cards .text {
    padding: 5px;
    font-family: Barlow Condensed;
  }
}

@media all and (max-width: 1334px) {
  .about-img img {
    width: 300px;
    height: 500px;
  }
}

@media all and (max-width: 1116px) {
  .about {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
  }

  .about-img {
    flex: 1;
    margin-bottom: 20px;
  }

  .about-text {
    flex: 1;
    margin: auto;
    text-align: center;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
  }

  .about-text h2 {
    font-size: 35px;
  }

  .about-img img {
    width: 400px;
    height: 400px;
  }
}

@media all and (max-width: 708px) {
  .footer {
    width: 100%;
    height: 670px;
    position: relative;
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
  }
}
Posted by: Anjali Mundhe on March-14-2023

Browse Popular Code Answers by Language