Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

webbsrvprg/projects/slutprojekt/css/

recipe.css
styles.css

styles.css

207 lines ASCII Windows (CRLF)
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: rgb(223, 223, 223);

}

header {
  background-color: rgb(255, 255, 255);
  border-bottom: 2px solid rgb(158, 158, 158);
  padding: 6px 10px;
}

.navbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}


.logo-link{
  text-decoration: none;
  font-weight: bold;
  color: rgb(16, 21, 95);
  text-shadow: black 1px 1px 1px; 
  font-size: 45px;
}


#nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  justify-content: center;
}

#login {
  justify-self: end;
}
#nav-links li a {
  color: black;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
}

#nav-links li a:hover {
  text-decoration: underline;
}

main{
  margin: auto;
  margin-top: 45px;
  padding: 10px;
}
.center {
  text-align: center;
}
h1 {
  font-size: 24px;
  justify-self: center;
  margin: 10px;
}

#searchbar {
  width: 460px;
  height: 40px;
  font-size: 16px;
  padding: 10px;
  border-radius: 25px;
  color: black;
}

#page-container {
  position: relative;
  min-height: 100vh;
}

#content-wrap {
  padding-bottom: 8rem;
}

#results-container{
  width: 1050px;
  margin: auto;
  margin-top: 50px;

}


#results {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
}

#results a{
  margin: auto;
}

.recipe {
  display: flex;
  flex-direction: column;
  width: 240px;
  background-color: white;
  box-shadow: rgb(102, 100, 100) 1px 1px 6px;
}

.recipe:hover{
  box-shadow: rgb(66, 65, 65) 1px 1px 8px;

}

.recipe img {
  width: 100%;  
  object-fit: cover;
  height: 240px;
}

a {
  text-decoration: none;
}
.recipe p {
  color: black;
  padding: 5px;
  padding-top: 5px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  border-top: 1px solid rgb(139, 139, 139);
  height: 75px;
}

footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 6.5rem; 
  background-color: rgb(255, 255, 255);
  border-top: 5px solid rgb(1, 1, 19);
  color: black;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 10px;
}
#menu-btn {
  display: none;
  width: 40px;
  height: 40px;
}


/*Responsive web*/

@media screen and (max-width:1080px){
  #results {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }

  #results-container{
    width: 800px;
    margin: auto;
    margin-top: 50px;
  
  }
}

@media screen and (max-width: 700px){
  #menu-btn {
    float: right;
    display: block;
  }

  .logo {
    display: inline-block;
  }
  .navbar {
    display: block;
  }
  #nav-links {
    display: none;
  }
  #login {
    display: none;
    justify-self: auto;
  }
  #searchbar {
    width: 100%;
  }

  #results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #results-container{
    width: 100%;
    margin-top: 50px;
  }
}