Responsive Landing Page

I’ve spent weeks researching, using trial and error and even created a site that was completely fitted to the mobile view and it worked when testing. The problem was, once I put that code into media queries in my original project, it didn’t work, everything looked terrible. My question is, what do I need to change in my original code to make it more responsive? Am I missing anything? Do I simply need to adjust the media queries? Also, what is the best template or way to start projects so that it’s easier to make things responsive?

Your code so far

Here’s a link to my code below:

The media query code is below (for the iphone5):
@media only screen and (max-width: 640px) {

  * {

    text-align: center;

    text-decoration: none;

    background-color: #e1ecf2;

    font-family: "Lato", sans-serif;

    list-style: none;

  }

}

@media only screen and (max-width: 640px) {

  .header,

  #header {

    display: flex;

    flex-direction: row;

    justify-content: center;

    align-items: center;

  }

}

@media only screen and (max-width: 640px) {

  #logo {

    font-size: 14px;

  }

}

@media only screen and (max-width: 640px) {

  ul {

    font-size: 12px;

  }

}

@media only screen and (max-width: 640px) {

#first {

  font-size: 12px;

}

}

@media only screen and (max-width: 640px) {

#form {

  display: flex;

  flex-direction: column;

  padding-bottom: 40px;

  justify-content: center;

  align-content: center;

  align-items: center;

}

}

@media only screen and (max-width: 640px) {

#email {

  padding: 5px;

  border: 1px solid;

  background-color: white;

}

}

@media only screen and (max-width: 640px) {

#submit {

  margin-top: 10px;

  padding: 10px;

  background-color: #42b0f5;

}

}

@media only screen and (max-width: 640px) {

.feat-container {

  font-size: 12px;

}

}

@media only screen and (max-width: 640px) {

  .video {

  display: none;

}

}

@media only screen and (max-width: 640px) {

#prod-pricing {

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  align-content: center;

  font-size: 12px;

  padding: 10px;

}

}

@media only screen and (max-width: 640px) {

.product {

  display: flex;

  flex-direction: column;

  align-content: center;

  align-items: center;

  justify-content: center;

  border: 1px solid black;

  padding: 10px;

  margin: 5px;

}

}

@media only screen and (max-width: 640px) {

.text {

  margin-right: 25px;

}

}

@media only screen and (max-width: 640px) {

.button, strong {

  background-color: #42b0f5;

  padding: 10px;

}

}

@media only screen and (max-width: 640px) {

footer > ul > li > a {

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-content: center;

  align-items: center;

  padding-right: 40px;

}

}

@media only screen and (max-width: 640px) {

footer > span {

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-content: center;

  align-items: center;

  font-size: 12px;

}

}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36.

Challenge: Build a Product Landing Page

Link to the challenge:

I appreciate the assistance, I am very discouraged at this point.

First of all, your media query should not have the extra text of “only screen and” before the width statement.

Take a look at the footer in your project. It is too big to be viewed on a small device and creates a horizontal scroll. Try not to base the widths of your items on pixels. Use percentages instead.

The links in your page fly out of the screen when viewed on a smaller screen. Put them in a single div and float them to the right if you want them to be there.

There also seems to be an invisible div over the input. I can’t enter any text in it.

If I resize the width of the screen, the logo seems to be trying to escape the eyes of whoever is viewing it. There is some kind of media query that makes it fly off the screen.

Try using css flexbox to keep your elements positioned properly.

try to change the view of your codepen screen to the one shown below:

You can resize it the the scale view of a phone:

I use that layout to test responsivity.
Hope that helps.

Nice work, by the way.