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

Logo position works fine on desktop and portrait mode for mobile, but on landscape on my iPhone looks cut off. Help?

Hi, I have a landing page at brianpolonia.com and it looks fine on desktop and on my iPhone in portrait mode but when I turn to landscape my logo is being cropped at the top. Can someone help?

html is

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <title>Brian Polonia: Web Portfolio</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/primary.css">
    <script src="/js/countdown.js"></script>
</head>
<body>
<div class="container">
    <div>
        <img src="images/bp_logo.png" alt="Brian Polonia's Logo">
        <h1 id="bp"><span>Brian</span>Polonia</h1>
        <h1 id="countdown-holder"></h1>
    </div>
</div>
 <script>
  var clock = document.getElementById("countdown-holder")
    , targetDate = new Date(2015, 01, 08); // Jan 1, 2050;

  clock.innerHTML = countdown(targetDate).toString();
  setInterval(function(){
    clock.innerHTML = countdown(targetDate).toString();
  }, 1000);
</script>   
</body>
</html>

and css is

html,
body {
    height: 100%;
    font-family: helvetica, sans-serif; 
    font-size: 1rem;
    line-height: 1.5;
}

img {

    max-width: 150px;
    margin: 10px auto 20px;
    display: block;

}

#bp {
    text-align: center;
    font-weight: 800;
}

#bp span {
    font-weight: 100;
}

#countdown-holder {
    font-size: 1rem;
    font-weight: 400;
    width: 90%;
    max-width: 350px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 8px 3px -3px rgba(64, 64, 64, 0.6);
    -webkit-box-shadow: 0 8px 3px -3px rgba(64, 64, 64, 0.6);
    padding-bottom: 2px;
}


.container {
    height: 100%;
    position: relative;

}

div.container div {
    width: 100%;
    position: absolute;
    margin: 0;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);



}

@media (max-width: 736px) and (min-width: 415px){

    img{
        max-width: 75px;
    }

}

I found the solution. It's an iOS bug apparently. Check out this link to read more about the bug and its fix. Here