<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
margin: 0px;
padding: 0px;
box-sizing: border-box;
background-color: bisque;
}
.parent{
height: 100vh;
display: grid;
grid-template-rows: 10% 80% 10%;
grid-template-columns: 10% 80% 10%;
border: 2px solid tomato;
}
.header{
background-color: goldenrod;
grid-column: 1/4;
grid-row: 1/2;
justify-content: center;
border: 2px solid red;
display: flex;
}
.left{
background-color: aqua;
grid-column: 1/2;
grid-row:2/3 ;
border: 2px solid green;
justify-content: first baseline;
}
.main{
background-color: aqua;
grid-column: 2/3;
grid-row:2/3 ;
border: 2px solid lime;
justify-content: first baseline;
}
.right{
background-color: yellowgreen;
grid-column: 3/4;
grid-row:2/3 ;
border: 2px solid rosybrown;
justify-content: first baseline;
}
.footer{
background-color: rgb(156, 203, 15);
grid-column: 1/4;
grid-row:3/4 ;
border: 2px solid rgb(155, 11, 11);
justify-content: center;
}
#img1{
width: 20px;
height: 20px;
border: 2px solid blue;
border-radius: 50px;
}
</style>
</head>
<body>
<div class="parent">
<div class="header">
<div>
<img src="fb.GIF" id="img1">
<b>Sathya Technologies</b>
</div>
<div>
<a href="#">Home</a>
<a href="">About</a>
<a href="">Contact</a>
<a href="">Login</a>
<a href="">Register</a>
</div>
</div>
<div class="left"> Left Content Area</div>
<div class="main"> Main Content Area</div>
<div class="right">Right Content Area</div>
<div class="footer">@CopyRights-ProSkills-2024</div>
</div>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
margin: 0px;
padding: 0px;
box-sizing: border-box;
background-color: bisque;
}
.parent{
height: 100vh;
display: grid;
grid-template-rows: 10% 80% 10%;
grid-template-columns: 10% 80% 10%;
border: 2px solid tomato;
}
.header{
background-color: goldenrod;
grid-column: 1/4;
grid-row: 1/2;
justify-content: center;
border: 2px solid red;
display: flex;
}
.left{
background-color: aqua;
grid-column: 1/2;
grid-row:2/3 ;
border: 2px solid green;
justify-content: first baseline;
}
.main{
background-color: aqua;
grid-column: 2/3;
grid-row:2/3 ;
border: 2px solid lime;
justify-content: first baseline;
}
.right{
background-color: yellowgreen;
grid-column: 3/4;
grid-row:2/3 ;
border: 2px solid rosybrown;
justify-content: first baseline;
}
.footer{
background-color: rgb(156, 203, 15);
grid-column: 1/4;
grid-row:3/4 ;
border: 2px solid rgb(155, 11, 11);
justify-content: center;
}
#img1{
width: 20px;
height: 20px;
border: 2px solid blue;
border-radius: 50px;
}
</style>
</head>
<body>
<div class="parent">
<div class="header">
<div>
<img src="fb.GIF" id="img1">
<b>Sathya Technologies</b>
</div>
<div>
<a href="#">Home</a>
<a href="">About</a>
<a href="">Contact</a>
<a href="">Login</a>
<a href="">Register</a>
</div>
</div>
<div class="left"> Left Content Area</div>
<div class="main"> Main Content Area</div>
<div class="right">Right Content Area</div>
<div class="footer">@CopyRights-ProSkills-2024</div>
</div>
</body>
</html>
👍4
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dropdown Navigation Example</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Header Section -->
<div class="header">
<h1>My Website</h1>
<p>Welcome to my website</p>
</div>
<!-- Navigation Bar -->
<div class="navbar">
<a href="#home">Home</a>
<a href="#about">About</a>
<a href="#services">Services</a>
<div class="dropdown">
<button class="dropbtn" onclick="toggleDropdown()">Courses</button>
<div class="dropdown-content" id="dropdown-menu">
<a href="#java">Java</a>
<a href="#html">HTML</a>
<a href="#python">Python</a>
</div>
</div>
<a href="#contact">Contact</a>
</div>
<!-- Main Content -->
<div class="content">
<h2>About Us</h2>
<p>This is the about section of the website.</p>
</div>
<!-- Footer Section -->
<div class="footer">
<p>© 2024 My Website</p>
</div>
<script src="script.js"></script>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dropdown Navigation Example</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Header Section -->
<div class="header">
<h1>My Website</h1>
<p>Welcome to my website</p>
</div>
<!-- Navigation Bar -->
<div class="navbar">
<a href="#home">Home</a>
<a href="#about">About</a>
<a href="#services">Services</a>
<div class="dropdown">
<button class="dropbtn" onclick="toggleDropdown()">Courses</button>
<div class="dropdown-content" id="dropdown-menu">
<a href="#java">Java</a>
<a href="#html">HTML</a>
<a href="#python">Python</a>
</div>
</div>
<a href="#contact">Contact</a>
</div>
<!-- Main Content -->
<div class="content">
<h2>About Us</h2>
<p>This is the about section of the website.</p>
</div>
<!-- Footer Section -->
<div class="footer">
<p>© 2024 My Website</p>
</div>
<script src="script.js"></script>
</body>
</html>
👍1👎1
/* General Styling */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
background-image: url(bg3.jpg);
background-repeat: no-repeat;
background-size: cover;
opacity: 0.9;
}
/* Header Styling */
.header {
background-color: #4CAF50;
color: white;
text-align: center;
padding: 20px;
}
/* Navigation Bar Styling */
.navbar {
background-color: #333;
overflow: hidden;
}
.navbar a, .dropbtn {
float: left;
display: block;
color: white;
text-align: center;
padding: 14px 20px;
text-decoration: none;
cursor: pointer;
}
.navbar a:hover, .dropbtn:hover {
background-color: #ddd;
color: black;
}
/* Dropdown Menu Styling */
.dropdown {
float: left;
position: relative;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #ddd;
}
/* Show Dropdown on Click */
.show {
display: block;
}
/* Main Content Styling */
.content {
padding: 20px;
background-image: url(bg2.jpg);
background-repeat: no-repeat;
background-size: cover;
}
/* Footer Styling */
.footer {
background-color: #333;
color: white;
text-align: center;
padding: 10px;
position: relative;
bottom: 0;
width: 100%;
}
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
background-image: url(bg3.jpg);
background-repeat: no-repeat;
background-size: cover;
opacity: 0.9;
}
/* Header Styling */
.header {
background-color: #4CAF50;
color: white;
text-align: center;
padding: 20px;
}
/* Navigation Bar Styling */
.navbar {
background-color: #333;
overflow: hidden;
}
.navbar a, .dropbtn {
float: left;
display: block;
color: white;
text-align: center;
padding: 14px 20px;
text-decoration: none;
cursor: pointer;
}
.navbar a:hover, .dropbtn:hover {
background-color: #ddd;
color: black;
}
/* Dropdown Menu Styling */
.dropdown {
float: left;
position: relative;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #ddd;
}
/* Show Dropdown on Click */
.show {
display: block;
}
/* Main Content Styling */
.content {
padding: 20px;
background-image: url(bg2.jpg);
background-repeat: no-repeat;
background-size: cover;
}
/* Footer Styling */
.footer {
background-color: #333;
color: white;
text-align: center;
padding: 10px;
position: relative;
bottom: 0;
width: 100%;
}
👍2
<script>
function validate(){
var name=document.f1.name.value;
var password=document.f1.password.value;
var status=false;
if(name.length<1){
document.getElementById("nameloc").innerHTML= "*Please enter your name";
status=false;
}else{
//document.getElementById("nameloc").innerHTML="<img src='checked.gif'/>";
status=true;
}
if(password.length<6){
document.getElementById("passwordloc").innerHTML= "*Password must be at least 6 char long";
status=false;
}else{
// document.getElementById("passwordloc").innerHTML=" <img src='checked.gif'/>";
}
return status;
}
</script>
<form name="f1" action="#" onsubmit="return validate()">
<table>
<tr><td>Enter Name:</td><td><input type="text" name="name"/>
<span id="nameloc" style="color: red;"></span></td></tr>
<tr><td>Enter Password:</td><td><input type="password" name="password"/>
<span id="passwordloc" style="color: red;"></span></td></tr>
<tr><td colspan="2"><input type="submit" value="register"/></td></tr>
</table>
</form>
function validate(){
var name=document.f1.name.value;
var password=document.f1.password.value;
var status=false;
if(name.length<1){
document.getElementById("nameloc").innerHTML= "*Please enter your name";
status=false;
}else{
//document.getElementById("nameloc").innerHTML="<img src='checked.gif'/>";
status=true;
}
if(password.length<6){
document.getElementById("passwordloc").innerHTML= "*Password must be at least 6 char long";
status=false;
}else{
// document.getElementById("passwordloc").innerHTML=" <img src='checked.gif'/>";
}
return status;
}
</script>
<form name="f1" action="#" onsubmit="return validate()">
<table>
<tr><td>Enter Name:</td><td><input type="text" name="name"/>
<span id="nameloc" style="color: red;"></span></td></tr>
<tr><td>Enter Password:</td><td><input type="password" name="password"/>
<span id="passwordloc" style="color: red;"></span></td></tr>
<tr><td colspan="2"><input type="submit" value="register"/></td></tr>
</table>
</form>
👍2