Search code examples
htmlcssmobile-website

What's letting the horizontal scroll still happen on Android?


I've looked through a bunch of different questions here and tutorials elsewhere, trying various solutions to stop the horizontal scroll on my website on Chrome for Nexus 5.

The website is http://kennethfrancis.com

This hasn't seemed to change anything:

    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0 maximum-scale=1" />

I want the HR to snap to full screen width when tablet or phone-sized, but to disable the horizontal scroll. Other tips about the HTML and CSS are appreciated.

EDIT: Looks like the GMail logo is wiggling when I hover it in Chrome 30.. Any ideas about that would be appreciated also.


Solution

  • Its the margin style on your hr.. min-width of 700px is one cause and the width in media query is 200%.. make it 100%

        @media only screen and (max-width: 768px) and (min-width: 320px)
        hr {
        margin-left: -20%;
        width: 200%;
        margin-top: -60px;
        }
    
        hr {
        margin-top: -80px;
        border: 0;
        clear: both;
        display: block; 
        min-width: 700px; 
        background-color:#70B2FF;
        height: 1px;
    }
    

    change to

        @media only screen and (max-width: 768px) and (min-width: 320px)
        hr {
        margin-left: -20%;
        width: 100%;
        margin-top: -60px;
        }
    
        hr {
        margin-top: -80px;
        border: 0;
        clear: both;
        display: block; 
        background-color:#70B2FF;
        height: 1px;
    }