Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Media Query Not Working in Act-On

I'm creating a landing page through Act-On and although my responsive design works on my end, it isn't looking the same through this platform. If anyone has any ideas why this is happening I'd appreciate it! Thanks! Ps. I do have a meta tag in my header :)

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

    section {
    background-attachment:initial;
  }
    .btn-red{
        background:#e10c20;
    }
    .header-information-right{
         margin:0 auto;
        text-align:center;
        padding-top:5px;
    }
    .header-information-left{
        margin:0 auto;
        text-align:center;
    }
    .team-item{
        margin-bottom:30px;
    }

    .wrapper-inner {
        max-width: none;
    padding:40px 0 80px 35px;
    }

    .col-md-4.small-padding-right, .col-md-6.small-padding-right{
        padding-right:15px!important;

    }

    .testimonials-info{
        border-right: none;
        padding:0;
    }

    .testimonials-wrapper{
        text-align:center;
    }

    img.author-pic{
        float:none;
        margin:0;
    }

    p.author-name{
        float:none;
        margin: 0 auto;
        padding-top:20px;
        padding-bottom:10px;
    }


    p.testimonials-text {
      float:none;
      padding:10px 0 0 0;
      font-size: 18px;
      line-height: 28px;
    }

}

1 Answer

Paul Walker
Paul Walker
28,904 Points

Hey Heather,

Your media query may not act normally through a third party application. See if they have any documentation. I usually layout my site for the smallest devices first and go from there. See sample below. Good luck.

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