skip to Main Content

I have my website looking all snazzy on desktop but on mobile it just looks terrible the page is pushed to the left and the centering is completely broken

here is my code


<!DOCTYPE html>

<!-- I know my codes messy -->
<!-- If you dont agree and want to -->
<!-- Hire me just need someone to speak to or think you can help -->
<!-- Shoot me a email: [email protected] -->
<!-- Or you can tweet me: @MarleyJPlant -->

        <meta name="description" content="MarleyJPlant Graphic Design Coding And Gaming" />
        <meta name="keywords" content="Marley Joseph Plant, MarleyPlant, Marley Plant, Marley, Arduduck, Simon Hedley, YRS, Young Rewired, Rewired State, Young Rewired State, YRS 2015, Best In Design, MarleyJPlant, Young Rewired Winner" />
        <meta name="author" content="metatags generator">
        <meta name="robots" content="index, follow">
        <meta name="revisit-after" content="1 days">
        <link rel=”author” href=””/>
        <title>Marley Joseph Plant</title>
        <!-- Marley Plant, Marley Joseph Plant, MarleyJPlant -->

        <meta content='width=device-width, initial-scale=1' name='viewport'/>
        <link rel="stylesheet" href="css/main.css">
        <link rel="stylesheet" href="">
        <link rel="stylesheet" href="">
        <link rel="stylesheet" href="">
        <script type="text/javascript" src=""></script>
        <script type="text/javascript" src=""></script>
        <script type="text/javascript" src="js/navigate.js"></script>
        <script type="text/javascript" src="js/Icons.js"></script>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src=""></script>
        <div class="MainPart">
        <div class="title">
            <center><h1 class="title" >Marley Plant</h1></center>
        <br />
        <br />
        <br />
        <br />
        <br />
        <div class="social">
                <a href=""  alt="Facebook" class="fa fa-facebook fa-5x Icon"></a>
                <a href=""  alt="Twitter" class="fa fa-twitter fa-5x Icon"></a>
                <a href=""  alt="Github" class="fa fa-github fa-5x Icon"></a>
                <a href=""  alt="WordPress" class="fa fa-wordpress fa-5x Icon"></a>
                <a href="" alt="Vine" class="fa fa-vine fa-5x Icon"></a>
                <a href="" alt="youtube" class="fa fa-youtube-play fa-5x Icon"></a>
                <a href="" alt="steam" class="fa fa-steam fa-5x Icon"></a>
                <a href="" alt="Flickr" class="fa fa-flickr fa-5x Icon"></a>
                <a href=""  alt="Instagram" class="fa fa-instagram fa-5x Icon"></a>
                <a href="" alt="Stack Overflow" class="fa fa-stack-overflow fa-5x Icon"></a>



    color: #5E6973;
    font-family: universe;
    text-align: center;
    font-size: 125px;

      position: relative;
      top: 50%;
      transform: translateY(50%);

    background-image: url("/images/background.jpg");

::-webkit-scrollbar { 
    display: none; 

    text-decoration: none;
    padding-right: 40px;
    padding-bottom: 30px;
    color: #7CFFC4;
    -webkit-transition-duration: 0.8s;
    -moz-transition-duration: 0.8s;
    -o-transition-duration: 0.8s;
    transition-duration: 0.8s;
    -webkit-transition-property: -webkit-transform;
    -moz-transition-property: -moz-transform;
    -o-transition-property: -o-transform;
    transition-property: transform;


@font-face {
    font-family: universe;
    src: url('Universe.ttf');

    align: center;

    background-image: url("/images/background2.png");

you can find a live version over at
I have checked the centering on my iphone 5 and my nokia lumia 920 both look the same

i’m using these library’s:




  1. The large text is only left-aligned when the words are too long to fit.

    The icons have padding-right but no padding-left, so they are never centered. You don’t notice it as much on a wide screen, but it becomes obvious on a narrow screen.

    (I also noticed that while you have prefixed properties, you have sometimes forgotten the real property, for example transform in .Icon)

    Login or Signup to reply.
  2. First off, the center tag is deprecated.

    Secondly, you’re not vertically centering correctly.

    You need to make your .MainPart position: absolute and change transform: translateY(50%) to transform: translateY(-50%).

    That will bring up the horizontal centering issue, which you would need to add left: 50% and change translateY(-50%) to translate(-50%, -50%);

    Working example:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top