Make desktop 80% and mobile 100% width

Discussion in 'GeoCraft WordPress Theme' started by leosherlock, Feb 14, 2015.

  1. leosherlock

    leosherlock Member

    Joined:
    Dec 23, 2014
    Messages:
    80
    Likes Received:
    0
    Hi there,

    My website is perfect at 80% width on destkop and 100% width on mobile (80% width on mobile doesn't work properly).

    Here is the custom code to make the website 80% for desktop. Can you please give me some code that will make it 100% width on mobile.

    Code:
    .box_as_background {
    width: 80%;
    margin: 0 auto;
    border: 2px solid black;
    }
     
    .box_as_background {
    background: white;
    }
    body {
    background-image: url("http://website.com/stripes.png");
    }
    


    Thank you,
    Leo
     
  2. praveen

    praveen Support Staff

    Joined:
    Jan 1, 2015
    Messages:
    2,344
    Likes Received:
    67
    Hey Leo!

    Please paste the code given below in Custom CSS section
    (Appearance -> Theme Options -> Styling Options -> Custom CSS) of your dashboard.

    Code:
    @media only screen and (max-width: 767px){
    .box_as_background {
    width: 100% !important;
    }
    }
    Thanks,
    Praveen
     

Share This Page