Yummys Responsive
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Yummy's Cafe</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Delius+Unicase:wght@700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Lexend+Zetta&display=swap" rel="stylesheet">
<!-- <link rel="stylesheet" media="screen and (max-width: 1070px)" href="phone.css"> -->
<link rel="stylesheet" media="screen and (max-width: 1100px)" href="mobile.css">
</head>
<body>
<nav id="navbar">
<div id="logo">
<img src="logo.png" alt="Yummy's Cafe">
</div>
<ul>
<li class="item"><a href="#home">Home</a></li>
<li class="item"><a href="#sponsors">About Us</a></li>
<li class="item"><a href="#service">Services</a></li>
<li class="item"><a href="#contact">Contact Us</a></li>
</ul>
</nav>
<section id="home">
<h1 class="primary">YUMMY'S CAFE</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsam alias nostrum cumque laborum! Similique
perferendis explicabo doloribus.
<div>
<button class="btn">
Order Now
</button>
</div>
</p>
</section>
<section class="service">
<h1 class="primary center">OUR SERVICES</h1>
<div id="service">
<div class="box">
<img src="../Responsive/flame.png" class="center" alt="coffee">
<h2 class="center"> DRINKS </h2>
<p class="center"> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quam, dolore atque officia
magni facere dolores quaerat. Doloribus a ea recusandae, ab illum nesciunt facere nihil pariatur
iste ratione molestias cum.</p>
</div>
<div class="box">
<img src="../Responsive/eat (1).png" class="center" alt="food">
<h2 class="center"> SNACKS </h2>
<p class="center"> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quam, dolore atque officia
magni facere dolores quaerat. Doloribus a ea recusandae, ab illum nesciunt facere nihil pariatur
iste ratione molestias cum.</p>
</div>
<div class="box">
<img src="../Responsive/delivery.png" alt="delivery" class="imgd" >
<h2 class="center"> DELIVERY</h2>
<p class="center"> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quam, dolore atque officia
magni facere dolores quaerat. Doloribus a ea recusandae, ab illum nesciunt facere nihil pariatur
iste ratione molestias cum.</p>
</div>
</div>
</section>
<section id="sponsors">
<h1 class="primary center">SPONSORS</h1>
<div id="clients">
<div class="client-item">
<img src="../Responsive/pogog.png" alt="">
</div>
<div class="client-item">
<img src="../Responsive/pogpl.png" alt="">
</div>
<div class="client-item">
<img src="../Responsive/flat.png" alt="">
</div>
</div>
</section>
<section id="contact">
<h1 class="primary center">CONTACT US</h1>
<div id="contact-box">
<form action="nobackend.php">
<div class="form-group">
<label for="name">Name:</label>
<input type="text" name="name" id="name" placeholder="Enter your Name">
</div>
<div class="form-group">
<label for="name">Address:</label>
<input type="text" name="Address" id="Address" placeholder="Enter Address">
</div>
<div class="form-group">
<label for="name">Contact:</label>
<input type="number" name="Contact" id="name" placeholder="Enter your Contact number">
</div>
<label for="Feedback">Feedback</label>
<textarea name="textarea" id="textarea" placeholder="comments" cols="30" rows="10">
</textarea>
<button type="submit" class="btn" >Submit</button>
</form>
</div>
</section>
<footer>
<div class="center">
Copyright © www.yummyscafe.comn All rights Reserved
</div>
</footer>
</body>
</html>
CSS FOR DESKTOP AND OVERALL
/* css reset */
*{
margin: 0px;
padding: 0px;
}
html{
scroll-behavior: smooth;
}
/* CSS variables */
:root{
}
/* navigation bar */
#navbar{
display: flex;
align-items: center;
position: sticky;
/* flex-direction: column; */
}
#navbar::before{
content: "";
background-color: black;
position: absolute;
height: 100%;
width: 100%;
z-index: -1;
opacity: 0.9;
}
/* logo and img */
#logo{
margin: 10px 14px;
}
#logo img {
height: 100px;
width: 140px;
margin: 2px 2px;
}
/* list */
ul{
display: flex;
}
li{
list-style: none;
font-size: 1.2rem;
}
ul li a {
display: block;
padding: 5px 13px;
border-radius: 50px;
text-decoration: none;
margin: 5px 7px;
color: white;
}
ul li a:hover {
color: black;
background-color: white;
}
/* ====================================================== */
/* HOME */
#home{
display: flex;
flex-direction: column;
padding: 5px 200px;
justify-content: center;
align-items: center;
height: 510px;
}
#home::before{
content: "";
position: absolute;
background: url('../Responsive/bgi.jpg') no-repeat center center/cover ;
height: 100%;
width: 100%;
z-index: -1;
opacity: 0.99;
top: 0px;
}
#home h1{
color: white;
text-align: center;
font-family: 'Delius Unicase', cursive;
}
#home p{
color: white;
text-align: center;
font-size: 1.5rem;
}
/* utility class */
.primary{
font-size: 2.9rem;
padding: 12px;
}
footer{
background: black;
color: white;
padding: 9px 20px;
}
.center{
text-align: center;
}
.btn{
padding: 8px 14px;
border: 2px solid white;
background-color: white;
color: white;
margin: 25px;
font-size: 1.4rem;
color: black;
border-radius: 50px;
cursor: pointer;
}
.btn:hover{
color: white;
background-color: black;
}
#service{
margin: 34px;
display: flex;
}
#service .box{
border: 2px solid black;
margin: 10px 15px;
padding: 20px 20px;
border-radius: 30px;
background-color: rgb(215, 221, 206);
}
#service .box img{
height: 180px;
width: 180px;
margin: auto;
display: block;
}
h2{
font-size: 2.5rem;
margin: 15px;
}
/* h1{
margin-top: 90px; */
}
.servive .box img .imgd{
width: 250px;
height: 100px;
}
h1{
/* font-family: 'Delius Unicase', cursive; */
/* font-family: 'Indie Flower', cursive; */
font-family: 'Lexend Zetta', sans-serif;
}
#sponsors{
/* height: 500px; */
/* border: 2px solid red; */
position: relative;
}
#clients{
display: flex;
justify-content: center;
align-items: center;
position: relative;
/* height: 300px; */
/* border: 2px solod red; */
}
#clients img{
height: 240px;
}
.client-item{
padding: 27px 39px;
}
#sponsors::before{
content: "";
background: url(../Responsive/egg.jpg) no-repeat center center/cover ;
position: absolute;
width: 100%;
height: 93%;
z-index: -1;
opacity: 0.8;
}
/* -------------------------------------------------------- */
/* contact */
#contact{
position: relative;
}
#contact::before{
position: absolute;
content: "";
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.8;
background: url('../Responsive/images.png') no-repeat center center/cover ;
}
#contact-box,
#contact-box input,
#contact-box textarea{
padding: 0.5rem;
width: 100%;
}
#contact-box{
display: flex;
justify-content: center;
align-items: center;
padding-bottom: 34px;
;
}
#contact-box form{
width: 30%;
font-size: 1.3rem;
}
#contact-box label{
font-size: 1.3rem;
}
#contact-box input,
#contact-box textarea{
border-radius: 10px;
border: 2px solid black;
}
CSS FOR RESPONSIVENESS
#navbar{
flex-direction: column;
}
#navbar ul li a {
font-size: 1rem;
padding: 0px 7px;
}
#service{
flex-direction: column;
}
#clients{
flex-wrap: wrap;
}
#home{
height: 470px;
padding: 3px 50px;
}
#home p{
font-size: 15px;
}
#home::before{
height: 300px;
}
.primary{
font-size: 25px;
}
.btn{
font-size: 15px;
padding: 5px 10px;
}
#clients img{
padding: 2px 1px;
width: 0px 66px;
margin: auto;
}
#contact-box form{
width: 60%;
margin: auto;
}










Comments
Post a Comment