I am finishing my tech portfolio so I can apply for a web developer job
my project page has some issues that I need some help fixing before I push it to live
my HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<title> ... Self-Taught Web Dev</title>
<link rel="stylesheet" type="text/css" href="https://use.fontawesome.com/releases/v6.1.1/css/all.css" />
<link rel="stylesheet" type="text/css" href="src/style.css" />
<link rel="stylesheet" href="https://use.typekit.net/qyn2bvt.css"> <!--links Adobe font -->
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<div class="projects-gallery">
<h1 class="page-2-title">My live projects so far</h1><br>
<div class="whole-projects">
<img class="project-img1" src="src/images/project-screenshots/project1.jpg"><br>
<p class="project-description">Woocommerce website with</p>
<p class="project-description">over 20 products in 6 languages and 3 currencies</p><br></div>
<div class="button-for-projects-page">View live project</div>
<!--project 2-->
<div class="whole-projects">
<img class="project-img2" src="src/images/project-screenshots/project2.PNG"><br>
<p class="project-description">WordPress Blog</p><br></div>
<div class="button-for-projects-page">View live project</div>
<!-- project 3 -->
<div class="whole-projects" id="third-project">
<img class="project-img3" src="src/images/project-screenshots/project3.PNG"><br>
<p class="project-description">Udemy Clone (in progress)</p><br></div>
<div class="button-for-projects-page">View live project</div>
</div>
</div>
</div>
<a id="to-top-viewport" href="#"><i class="fa-solid fa-circle-up fa-3x"></i></a>
</body>
</html>
my CSS (the last part relates to my projects-page):
* {
box-sizing: border-box;
}
body {
font-family: "gelato-luxe", 'Courier New', Courier, monospace;
font-size: 25px;
font-weight: 100;
font-style: normal;
color: #F9F9F9;
max-width: 1900px;
}
h1, h2, h3, p {
text-align: center;
}
h2 {
font-weight: 150;
color: #fbf7cd;
font-size: 30px;
}
h3 {
font-weight: 125;
margin-bottom: -2.5rem;
}
#under-construction {
margin-right: auto;
margin-left: auto;
display: block;
width: 200px;
height: 200px;
margin-top: -20px;
margin-bottom: -20px;
}
/* sections */
section {
height: 600px;
}
.hero {
background-image: url('...jpg');
background-position: center;
max-width: 2000px;
height: 100vh;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
.hero-area {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
#made-by {
font-weight: 300;
font-size: 24px;
letter-spacing: 8px;
}
#made-by > a { /* #made-by > a denotes the parent-child relationship here */
color: #fbf7cd;
text-decoration: underline;
}
/* sections */
/* navbar and its components */
nav {
display: flex; /* shows navbar content in vertical line instead of stacked */
justify-content: space-between; /* shows logo on the top-left corner and the navbar on the top-right corner */
}
ul {
display: flex; /* shows the unordered list on the same horizontal line and stacked */
list-style-type: none;
justify-content: space-around; /* show all items within <ul> to have same space around */
width: 500px;
font-size: 27px;
}
ul.show {
display: block;
}
li {
text-decoration: none;
}
.button {
width: 170px;
height: 70px;
background-color: #faf4b7; /* button in hero section */
color: #ecc5fb;
border-radius: 50% / 100% 100% 0 0;
line-height: 70px;
text-align: center;
margin: auto;
padding-right: 7px;
}
a {
text-decoration: none;
color: #ecc5fb;
}
a:hover { /* anchor tags */
color: #84d6c8;
text-decoration: none;
}
li > a {
color: #faf4b7;
}
li > a:hover {
color: #cdf0ea;
}
.logo {
width: 120px;
height: 100px;
}
.mobile-menu-icon {
max-width: 50px;
max-height: 50px;
}
.hamburger {
display: none;
}
@media only screen and (max-width: 1000px) {
.hamburger {
background-color: transparent;
border: transparent solid 0;
width: 50px;
height: 50px;
display: block;
margin: 0px;
align-self: flex-end;
}
ul {
display: none;
background-color: #fbf7cd;
}
li > a {
color: #84d6c8;
}
li > a:hover {
color: #ecc5fb;
}
nav {
display: flex;
flex-direction: column-reverse;
background-color: #fbf7cd;
}
.logo {
display: none;
}
}
@media only screen and (max-width: 2274px) {
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow-x: hidden;
}
}
@media only screen and (min-width: 280px) and (max-width: 900px) {
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow-x: hidden;
}
}
section {
overflow-x: hidden; /* removes extra white space from right side and bottom side
when opening mobile menu */
}
/* my project page */
.projects-gallery {
display: flex;
flex-direction: column;
justify-content: center;
align-content: center;
flex-wrap: wrap;
gap: 3rem;
background-color: #cdf0ea;
/*height: 100%;*/
}
.project-img1, .project-img2, .project-img3 {
object-fit: cover;
width: 55%;
height: 45%;
margin-left: 23rem;
}
.button-for-projects-page {
width: 170px;
height: 70px;
background-color: #faf4b7;
color: #ecc5fb;
border-radius: 50% / 100% 100% 0 0;
line-height: 70px;
text-align: center;
margin: auto;
padding-right: 7px;
display: inline;
}
.project-description {
color: #84d6c8;
text-align: center;
margin-bottom: -10px;
}
.page-2-title {
color:#84d6c8;
margin-left: auto;
margin-right: auto;
padding-top: 10px;
}
.whole-projects {
background-color:#cdf0ea;
}
#to-top-viewport {
position: fixed;
color:#ecc5fb;
bottom: 20px;
right: 10px;
}
@media only screen and (min-width: 280px) and (max-width: 1024px) {
.projects-gallery {
display: flex;
justify-content: center;
align-content: center;
}
.project-img1, .project-img2, .project-img3 {
margin-left: 4rem;
margin-right: 0;
width: 70%;
height: 60%;
}
}
most of the screen sizes (for example I attached screenshots of one of the screen size that has this issue (width: 375px and height: 667px)) have the 3rd project being cut out of the HTML when zoomed to 100% on Chrome dev tool. why and how do I fix it?
Also another issue, the images are more towars the right or left side of the screen depending on the screen size. How do I fix that too?