Personal Portfolio Webpage - Build a Personal Portfolio Webpage “Your portfolio should use at least one media query.”

Tell us what’s happening:

I’m not passing the portfolio page due to an issue with the @media query.

Your code so far

/* Custom properties/variables  */
:root {
  --main-white: #f0f0f0;
  --main-red: #be3144;
  --main-blue: #45567d;
  --main-gray: #303841;
}

/* Base reset */
* {
  margin: 0;
  padding: 0;
  text-decoration: none;
  list-style:none;
}

/* box-sizing and font sizing */
*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  font-size: 62.5%;
  scroll-behavior: smooth;
}

/* Base styles */

body {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem; /* 18px */
  font-weight: 400;
  line-height: 1.4;
  color: var(--main-white);
}

h1,
h2 {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  text-align: center;
}

h1 {
  font-size: 6rem;
}

h2 {
  font-size: 4.2rem;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--main-white);
}

img {
  display: block;
  width: 100%;
}


/* nav */

.nav {
  display: flex;
  justify-content: flex-end;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--main-red);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.nav-list {
  display: flex;
  margin-right: 2rem;
}

.nav-list a {
  display: block;
  font-size: 2.2rem;
  padding: 2rem;
}

.nav-list a:hover {
  background: var(--main-blue);
}

/* Welcome section */
.welcome-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  background-color: #000;
  background-image: linear-gradient(62deg, #3a3d40 0%, #181719 100%);
}

.welcome-section > p {
  font-size: 3rem;
  font-weight: 200;
  font-style: italic;
  color: var(--main-red);
}



/* Projects section */
.projects-section {
  text-align: center;
  padding: 10rem 2rem;
  background: var(--main-blue);
}

.projects-section-header {
  max-width: 640px;
  margin: 0 auto 6rem auto;
  border-bottom: 0.2rem solid var(--main-white);
}


.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 4rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  margin-bottom: 6rem;
}

.project {
  background: var(--main-gray);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  border-radius: 2px;
}

.code {
  color: var(--main-gray);
  transition: color 0.3s ease-out;
}

.project:hover .code {
  color: #ff7f50;
}

.project-image {
  height: calc(100% - 6.8rem);
  width: 100%;
  object-fit: cover;
}

.project-title {
  font-size: 2rem;
  padding: 2rem 0.5rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 2px;
}

.btn-show-all {
  font-size: 2rem;
  background: var(--main-gray);
  transition: background 0.3s ease-out;
}

.btn-show-all:hover {
  background: var(--main-red);
}

.btn-show-all:hover > i {
  transform: translateX(2px);
}

.btn-show-all > i {
  margin-left: 10px;
  transform: translateX(0);
  transition: transform 0.3s ease-out;
}

/* Contact section */
.contact-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 80vh;
  padding: 0 2rem;
  background: var(--main-gray);
}

.contact-section-header > h2 {
  font-size: 6rem;
}

.contact-section-header > p {
  font-style: italic;
}

.contact-links {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 980px;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.contact-details {
  font-size: 2.4rem;
  text-shadow: 2px 2px 1px #1f1f1f;
  transition: transform 0.3s ease-out;
}

.contact-details:hover {
  transform: translateY(8px);
}


/* Footer */
footer {
  font-weight: 300;
  padding: 2rem;
  background: var(--main-gray);
  border-top: 4px solid var(--main-red);
}

footer > p {
  margin: 2rem;
  text-align: center;
}

/* Responsive Design -  Media Query */
@media screen and (max-width:1200px) {
  html {
    font-size: 60%;
  }
}

@media screen and (max-width: 980px) {
  html {
    font-size: 58%;
  }
}

@media screen and (max-width:490px) {
  .projects-section {
    padding: 6rem 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width:460px){
  html {
    font-size: 55%;
  }
  .nav {
    justify-content: center;
  }

 .nav-list {
    margin: 0 1rem;
  }
 .projects-section-header {
    font-size: 4rem;
  }
 .contact-section-header > h2 {
    font-size: 4rem;
  }
}

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Personal Portfolio Webpage - Build a Personal Portfolio Webpage

Hello! Welcome to our forum. Can you provide us with your HTML code as well?

1 Like

Thank you. Yes, I provide you my HTML code below -


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
    <link href="https://fonts.googleapis.com/css?family=Poppins:200i,300,400&amp;display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Raleway:700&amp;display=swap" rel="stylesheet">
    <link rel="stylesheet" href="styles.css">
    <title>Mst Surnaly Akter</title>
  </head>
  <body>

     <!--Start Navbar -->
    <nav id="navbar" class="nav">
      <ul class="nav-list">
        <li>
          <a href="#welcome-section">About</a>
        </li>
        <li>
          <a href="#projects">Work</a>
        </li>
        <li>
          <a href="#contact">Contact</a>
        </li>
      </ul>
    </nav>
    <!--End Navbar -->

       <!-- Start welcome section  -->
    <section id="welcome-section" class="welcome-section">
      <h1>Assalamu Alaikum <br> I am Mst Surnaly Akter</h1>
      <p>a web developer</p>
    </section>
    <!-- End welcome section -->

      <!-- Start Projects Section -->
    <section id="projects" class="projects-section">
      <h2 class="projects-section-header">These are some of my projects</h2>

      <div class="projects-grid">
        <a href="https://mstsurnalyakter.github.io/ecommerce_project/" target="_blank" class="project project-tile">
          <img class="project-image" src="https://github.com/mstsurnalyakter/portfolio/blob/master/images/ecommerce-project.png?raw=true" alt="project">
          <p class="project-title">
            <span class="code">&lt;</span>
            E-Commerce
            <span class="code">/&gt;</span>
          </p>
        </a>
        <a href="https://mstsurnalyakter.github.io/tribute-page/" target="_blank" class="project project-tile">
          <img class="project-image" src="https://github.com/mstsurnalyakter/portfolio/blob/master/images/tribute-page.png?raw=true" alt="project">
          <p class="project-title">
            <span class="code">&lt;</span>
            Tribute Page
            <span class="code">/&gt;</span>
          </p>
        </a>
        <a href="https://mstsurnalyakter.github.io/create_random_color_palette_generator/" target="_blank" class="project project-tile">
          <img class="project-image" src="https://github.com/mstsurnalyakter/portfolio/blob/master/images/random-color-palette-generator.png?raw=true" alt="project">
          <p class="project-title">
            <span class="code">&lt;</span>
            Random Color Palette Generator
            <span class="code">/&gt;</span>
          </p>
        </a>
        <a href="https://mstsurnalyakter.github.io/documentation-page/" target="_blank" class="project project-tile">
          <img class="project-image" src="https://github.com/mstsurnalyakter/portfolio/blob/master/images/tribute-page.png?raw=true" alt="project">
          <p class="project-title">
            <span class="code">&lt;</span>
            Documentation page
            <span class="code">/&gt;</span>
          </p>
        </a>
        <a href="https://mstsurnalyakter.github.io/portfolio1/" target="_blank" class="project project-tile">
          <img class="project-image" src="https://github.com/mstsurnalyakter/portfolio/blob/master/images/prortfolio.png?raw=true" alt="project">
          <p class="project-title">
            <span class="code">&lt;</span>
              Portfolio
            <span class="code">/&gt;</span>
          </p>
        </a>
        <a href="https://mstsurnalyakter.github.io/magazine/" target="_blank" class="project project-tile">
          <img class="project-image" src="https://github.com/mstsurnalyakter/portfolio/blob/master/images/magazine.png?raw=true" alt="project">
          <p class="project-title">
            <span class="code">&lt;</span>
            Magazine
            <span class="code">/&gt;</span>
          </p>
        </a>
      </div>

      <a href="https://github.com/mstsurnalyakter?tab=repositories" class="btn btn-show-all" target="_blank">Show all<i class="fas fa-chevron-right"></i></a>
    </section>
    <!-- End Projects Section -->


      <!-- Start Contact Section -->

<section id="contact" class="contact-section">
  <div class="contact-section-header">
    <h2>Contact Me...</h2>
    <p>Get In Touch</p>
  </div>
  <div class="contact-links">
     <a href="https://www.linkedin.com/in/mst-surnaly-akter/" class="btn contact-details" target="_blank"
      ><i class="fab fa-linkedin"></i> Linkedin</a
    >
    <a
      href="https://web.facebook.com/mstsurnalyakter"
      target="_blank"
      class="btn contact-details"
      ><i class="fab fa-facebook-square"></i> Facebook</a
    >
    <a
      id="profile-link"
      href="https://github.com/mstsurnalyakter"
      target="_blank"
      class="btn contact-details"
      ><i class="fab fa-github"></i> GitHub</a
    >
    <a
      href="https://twitter.com/mstsurnalyakter"
      target="_blank"
      class="btn contact-details"
      ><i class="fab fa-twitter"></i> Twitter</a
    >
    <a href="mailto:surnalyms@gmail.com" class="btn contact-details"
      ><i class="fas fa-at"></i> Send a mail</a
    >
    <a href="tel:+8801718275166" class="btn contact-details"
      ><i class="fas fa-mobile-alt"></i> Call me</a
    >

  </div>
</section>

<!-- End Contact Section -->


<!-- Start Footer Section -->

<footer>
  <p>
   Created By Mst Surnaly Akter! © 2023 All Right Reserved.
  </p>
</footer>

<!-- End Footer Section-->


   </body>
</html>
1 Like

You have two links that connect your CSS to HTML. You should only have one.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.