Problem Statement:- Landing Page of an NGO Website using HTML and CSS | Non-responsive Web Design | Static Webpage.
Image of Final Version of the website:-
logo.png
bg2.jpg
HTML and CSS code:-
Note:- Scroll horizontally to see the full line of code.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to NGO</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Oranienbaum&display=swap" rel="stylesheet">
</head>
<style>
body{
color: rgb(100, 5, 119);
margin: 0px;
padding: 0px;
background: url('../img/bg2.jpg') repeat;
background-size: cover;
background-position: center fixed;
/* height: 100vh;
width: 100vw; */
font-family: 'Oranienbaum', serif;
font-weight: bolder;
}
.left{
/* border: 2px solid rgb(27, 11, 248); */
display: inline-block;
position: absolute;
top: 0px;
margin: 10px 10px;
}
.left img{
width: 100px;
}
.left div{
text-align: center;
}
.mid{
display: block;
width: 55%;
margin: 10px auto;
/* border: 2px solid rgb(6, 243, 97); */
}
.right{
display: inline-block;
position: absolute;
right: 0px;
top: 0px;
width: 243px;
margin: 10px 10px;
padding: 10px 10px;
/* border: 2px solid rgb(241, 7, 202); */
}
.right .btn{
display: inline-block;
margin-left: 5px;
margin-right: 5px;
}
.btn{
border: 2px solid black;
border-radius: 5px;
background-color: rgb(0, 0, 0);
color: rgb(253, 253, 253);
padding: 2px 8px;
font-size: 17px;
font-weight: bolder;
font-family: 'Oranienbaum', serif;
}
.btn:hover{
background-color: rgb(122, 121, 121);
cursor: pointer;
}
.navbar{
display: inline-block;
}
.navbar li{
display: inline-block;
}
.navbar li a{
color: rgb(100, 5, 19);
text-decoration: none;
padding: 0px 55px;
font-size: 20px;
font-weight: bold;
}
.navbar li a:hover , .navbar li a.active{
text-decoration: underline;
color: yellowgreen;
}
.container{
border: 2px solid rgb(5, 116, 33);
width: 40%;
background-color: yellowgreen;
border-radius: 5px;
margin: 70px 50px;
padding: 20px 20px;
}
.form-group{
margin: 25px 130px;
}
.form-group input{
width: 100%;
text-align: center;
font-size: 25px;
font-family: 'Oranienbaum', serif;
border-radius: 4px;
background-color: white;
}
.container button{
display: inline-block;
width: 30%;
padding: 7px;
font-size: 22px;
margin: 5px 59px;
}
.container h1{
text-align: center;
}
</style>
<body>
<header class="header">
<div class="left" >
<img src="../img/logo.png" alt="">
<div class="tag">
Non Govt Org
</div>
</div>
<div class="mid" >
<ul class="navbar">
<li><a href="#" class="active">Home</a></li>
<li><a href="#">Events</a></li>
<li><a href="#">Contribute</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
<div class="right" >
<div >
<button class="btn">Call Us Now</button>
<button class="btn">Whatsapp Now</button>
</div>
</div>
</header>
<div class="container">
<h1>Contribute to NGO</h1>
<form action="noaction.php">
<div class="form-group">
<input type="text" name="name" id="" placeholder="Enter your Name">
</div>
<div class="form-group">
<input type="number" name="age" id="" placeholder="Enter your age">
</div>
<div class="form-group">
<input type="email" name="email" id="" placeholder="Enter your email">
</div>
<div class="form-group">
<input type="tel" name="tele" id="" placeholder="Enter your mobile number">
</div>
<div class="form-group">
<input type="text" name="locality" id="" placeholder="Enter your locality">
</div>
<button class="btn" type="reset">Reset </button>
<button class="btn" type="submit">Submit</button>
</form>
</div>
</body>
</html>
Comments
Post a Comment