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 In CSS:
/* Set up basic styling */

* {
    box-sizing:border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: Arial, sans-serif;
  }
  
  header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
  }
  
  nav ul {
    display: flex;
    justify-content: flex-end;
  }
  
  nav ul li {
    margin-left: 1rem;
  }
  
  nav ul li:first-child {
    margin-left: 0;
  }
  
  nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem;
  }
  
  main {
    min-height: 100vh;
    padding: 2rem;
  }
  
  h1, h2, h3 {
    margin-bottom: 1rem;
  }
  
  .project-tile {
    margin-bottom: 2rem;
  }
  
  .project-tile img {
    max-width: 100%;
  }
  
  footer {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
  }
  
  /* Add styles to fulfill the user stories */
  
  #navbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: #333;
    color: #fff;
    padding: 10px;
  }
  
  #welcome-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  
  #profile-link {
    color: #fff;
    text-decoration: underline;
  }

   @media only screen and(max-width: 768px) {
    nav ul {
      flex-direction: column;
    }
    
    nav ul li {
      margin-left: 0;
      margin-bottom: 1rem;
    }
    
    #navbar {
      position: fixed;
      top: 0;
      left: 0;
    }
    
    #welcome-section h1 {
      font-size: 2rem;
    }
    
    .project-tile img {
      max-width: 50%;
    }
  }

  @media only screen and (max-width: 600px) {
  body {
    background-color: lightblue;
  }
}

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/113.0.0.0 Safari/537.36

Challenge: Personal Portfolio Webpage - Build a Personal Portfolio Webpage

Link to the challenge:

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Can you post your html as well. It would be better if we could see everything together. You can use the format button that looks like </> and paste all your html in the two lines it gives you. You can also view the gif I have included in my first response

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