Grade 8: Lesson 2 dynamic web elements : PhotographyWebsite
1-Open w3schools tryit editor by this link:
https://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic
then copy this code then paste it in w3schools tryit editor:
<html>
<head>
<title> Photography WebSite </title>
<link rel="stylesheet" href="style.css">
<style>
* {
margin: 0;
padding: 0;
}
.main {
/* height: 1000px; */
width: 75%;
margin: auto;
font-family:'Trebuchet MS';
}
.header {
height: 200px;
background: linear-gradient(to right, #654ea3, #eaafc8);
color: white;
text-align: center;
border-radius: 5px;
}
.header h2 {
font-size: 32px;
font-weight: lighter;
padding: 20px;
}
.header h1 {
font-size: 40px;
}
.preview_container {
margin-top: 20px;
height: 600px;
padding: 5px;
box-shadow: 0px 5px 15px -2px rgba(0,0,0,0.75);
}
.preview_container img {
width: 100%;
height: 90%;
}
.preview_container h1 {
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
margin: auto;
}
.gallery_container {
margin-top: 40px;
display: flex;
overflow-x: auto;
margin-bottom: 30px;
}
.gallery_container img {
padding: 3px;
min-width: 20%;
height: 180px;
}
</style>
</head>
<body>
<div class="main">
<div class="header">
<h2> Welcome To My </h2>
<h1> <strong> IMAGE GALLERY </strong></h1>
</div>
<div class="preview_container">
<h1> MY PHOTO GALLERY </h1>
<img src="https://media.istockphoto.com/id/1145422105/fr/photo/vue-a%C3%A9rienne-de-la-tour-eiffel-paris.webp?s=1024x1024&w=is&k=20&c=vVDxjr9gS89JvD5hWoT-zz2j3fzPIMiqwAxCA0IwFVg=" alt="No Image Selected" id="preview_image" >
</div>
<div class="gallery_container" id="gallery_image" >
</div>
</div>
<script src="./script.js"></script>
</body>
</html>
Comments
Post a Comment