Center Div on Tablets












0















Site: https://dev.momentinaboxclub.com/
Area: About the box



I want this column to be centered on mobile devices. I am currently using this css in a media query:



.about-box {
width: 90%;
margin: 0 auto;
}


It seems to work on cell phones but on tablets the box is getting moved to the left. I can't figure out why it won't center. Please help.



Thank you!










share|improve this question

























  • Possible duplicate of How to auto adjust the div size for all mobile / tablet display formats?

    – First Name
    Nov 14 '18 at 0:42











  • Post is a duplicate, search for responsive web pages, you need to include meta tags.

    – First Name
    Nov 14 '18 at 0:43











  • Matt, familiarize yourself with your browser's document inspector. This sort of thing is trivial to diagnose these days once you do.

    – isherwood
    Nov 14 '18 at 3:08
















0















Site: https://dev.momentinaboxclub.com/
Area: About the box



I want this column to be centered on mobile devices. I am currently using this css in a media query:



.about-box {
width: 90%;
margin: 0 auto;
}


It seems to work on cell phones but on tablets the box is getting moved to the left. I can't figure out why it won't center. Please help.



Thank you!










share|improve this question

























  • Possible duplicate of How to auto adjust the div size for all mobile / tablet display formats?

    – First Name
    Nov 14 '18 at 0:42











  • Post is a duplicate, search for responsive web pages, you need to include meta tags.

    – First Name
    Nov 14 '18 at 0:43











  • Matt, familiarize yourself with your browser's document inspector. This sort of thing is trivial to diagnose these days once you do.

    – isherwood
    Nov 14 '18 at 3:08














0












0








0








Site: https://dev.momentinaboxclub.com/
Area: About the box



I want this column to be centered on mobile devices. I am currently using this css in a media query:



.about-box {
width: 90%;
margin: 0 auto;
}


It seems to work on cell phones but on tablets the box is getting moved to the left. I can't figure out why it won't center. Please help.



Thank you!










share|improve this question
















Site: https://dev.momentinaboxclub.com/
Area: About the box



I want this column to be centered on mobile devices. I am currently using this css in a media query:



.about-box {
width: 90%;
margin: 0 auto;
}


It seems to work on cell phones but on tablets the box is getting moved to the left. I can't figure out why it won't center. Please help.



Thank you!







html css3 responsive-design media-queries






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 0:50









Johannes

36.8k102967




36.8k102967










asked Nov 14 '18 at 0:38









MattMatt

4619




4619













  • Possible duplicate of How to auto adjust the div size for all mobile / tablet display formats?

    – First Name
    Nov 14 '18 at 0:42











  • Post is a duplicate, search for responsive web pages, you need to include meta tags.

    – First Name
    Nov 14 '18 at 0:43











  • Matt, familiarize yourself with your browser's document inspector. This sort of thing is trivial to diagnose these days once you do.

    – isherwood
    Nov 14 '18 at 3:08



















  • Possible duplicate of How to auto adjust the div size for all mobile / tablet display formats?

    – First Name
    Nov 14 '18 at 0:42











  • Post is a duplicate, search for responsive web pages, you need to include meta tags.

    – First Name
    Nov 14 '18 at 0:43











  • Matt, familiarize yourself with your browser's document inspector. This sort of thing is trivial to diagnose these days once you do.

    – isherwood
    Nov 14 '18 at 3:08

















Possible duplicate of How to auto adjust the div size for all mobile / tablet display formats?

– First Name
Nov 14 '18 at 0:42





Possible duplicate of How to auto adjust the div size for all mobile / tablet display formats?

– First Name
Nov 14 '18 at 0:42













Post is a duplicate, search for responsive web pages, you need to include meta tags.

– First Name
Nov 14 '18 at 0:43





Post is a duplicate, search for responsive web pages, you need to include meta tags.

– First Name
Nov 14 '18 at 0:43













Matt, familiarize yourself with your browser's document inspector. This sort of thing is trivial to diagnose these days once you do.

– isherwood
Nov 14 '18 at 3:08





Matt, familiarize yourself with your browser's document inspector. This sort of thing is trivial to diagnose these days once you do.

– isherwood
Nov 14 '18 at 3:08












3 Answers
3






active

oldest

votes


















1














There is a float: left in a media query for that element which affects tablet sizes and in your case applies to class .vc_col-sm-8 at min-width 768px.



Just add float: none; to your CSS rule for that element.






share|improve this answer
























  • Thank you (and everyone below) for taking the time to answer me. Sometimes when programming you just don't see the little stuff and I wasn't catching the float: left here. I appreciate it!

    – Matt
    Nov 14 '18 at 15:53



















0














In your HTML file there is a div that has a property: width: 66.66666667%;. If you change this to width: auto;, your issue will be resolved however it will get rid of the pink border around the text. If you add this line to your css file it should fix the alignment issue.



.wpb_column.vc_column_container.vc_col-sm-8.vc_col-has-fill {
width: auto;
}


Screenshot with changes



Hope this helps!






share|improve this answer































    0














    Add display: flex; to .full_section_inner, just for medium devices, that should work!



    @media only screen and (min-width: 768px) and (max-width: 992px){
    .full_section_inner{
    display: flex;
    justify-content: center;
    }
    }





    share|improve this answer

























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53291524%2fcenter-div-on-tablets%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      There is a float: left in a media query for that element which affects tablet sizes and in your case applies to class .vc_col-sm-8 at min-width 768px.



      Just add float: none; to your CSS rule for that element.






      share|improve this answer
























      • Thank you (and everyone below) for taking the time to answer me. Sometimes when programming you just don't see the little stuff and I wasn't catching the float: left here. I appreciate it!

        – Matt
        Nov 14 '18 at 15:53
















      1














      There is a float: left in a media query for that element which affects tablet sizes and in your case applies to class .vc_col-sm-8 at min-width 768px.



      Just add float: none; to your CSS rule for that element.






      share|improve this answer
























      • Thank you (and everyone below) for taking the time to answer me. Sometimes when programming you just don't see the little stuff and I wasn't catching the float: left here. I appreciate it!

        – Matt
        Nov 14 '18 at 15:53














      1












      1








      1







      There is a float: left in a media query for that element which affects tablet sizes and in your case applies to class .vc_col-sm-8 at min-width 768px.



      Just add float: none; to your CSS rule for that element.






      share|improve this answer













      There is a float: left in a media query for that element which affects tablet sizes and in your case applies to class .vc_col-sm-8 at min-width 768px.



      Just add float: none; to your CSS rule for that element.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 14 '18 at 0:49









      JohannesJohannes

      36.8k102967




      36.8k102967













      • Thank you (and everyone below) for taking the time to answer me. Sometimes when programming you just don't see the little stuff and I wasn't catching the float: left here. I appreciate it!

        – Matt
        Nov 14 '18 at 15:53



















      • Thank you (and everyone below) for taking the time to answer me. Sometimes when programming you just don't see the little stuff and I wasn't catching the float: left here. I appreciate it!

        – Matt
        Nov 14 '18 at 15:53

















      Thank you (and everyone below) for taking the time to answer me. Sometimes when programming you just don't see the little stuff and I wasn't catching the float: left here. I appreciate it!

      – Matt
      Nov 14 '18 at 15:53





      Thank you (and everyone below) for taking the time to answer me. Sometimes when programming you just don't see the little stuff and I wasn't catching the float: left here. I appreciate it!

      – Matt
      Nov 14 '18 at 15:53













      0














      In your HTML file there is a div that has a property: width: 66.66666667%;. If you change this to width: auto;, your issue will be resolved however it will get rid of the pink border around the text. If you add this line to your css file it should fix the alignment issue.



      .wpb_column.vc_column_container.vc_col-sm-8.vc_col-has-fill {
      width: auto;
      }


      Screenshot with changes



      Hope this helps!






      share|improve this answer




























        0














        In your HTML file there is a div that has a property: width: 66.66666667%;. If you change this to width: auto;, your issue will be resolved however it will get rid of the pink border around the text. If you add this line to your css file it should fix the alignment issue.



        .wpb_column.vc_column_container.vc_col-sm-8.vc_col-has-fill {
        width: auto;
        }


        Screenshot with changes



        Hope this helps!






        share|improve this answer


























          0












          0








          0







          In your HTML file there is a div that has a property: width: 66.66666667%;. If you change this to width: auto;, your issue will be resolved however it will get rid of the pink border around the text. If you add this line to your css file it should fix the alignment issue.



          .wpb_column.vc_column_container.vc_col-sm-8.vc_col-has-fill {
          width: auto;
          }


          Screenshot with changes



          Hope this helps!






          share|improve this answer













          In your HTML file there is a div that has a property: width: 66.66666667%;. If you change this to width: auto;, your issue will be resolved however it will get rid of the pink border around the text. If you add this line to your css file it should fix the alignment issue.



          .wpb_column.vc_column_container.vc_col-sm-8.vc_col-has-fill {
          width: auto;
          }


          Screenshot with changes



          Hope this helps!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 14 '18 at 1:53









          roberthayekroberthayek

          185




          185























              0














              Add display: flex; to .full_section_inner, just for medium devices, that should work!



              @media only screen and (min-width: 768px) and (max-width: 992px){
              .full_section_inner{
              display: flex;
              justify-content: center;
              }
              }





              share|improve this answer






























                0














                Add display: flex; to .full_section_inner, just for medium devices, that should work!



                @media only screen and (min-width: 768px) and (max-width: 992px){
                .full_section_inner{
                display: flex;
                justify-content: center;
                }
                }





                share|improve this answer




























                  0












                  0








                  0







                  Add display: flex; to .full_section_inner, just for medium devices, that should work!



                  @media only screen and (min-width: 768px) and (max-width: 992px){
                  .full_section_inner{
                  display: flex;
                  justify-content: center;
                  }
                  }





                  share|improve this answer















                  Add display: flex; to .full_section_inner, just for medium devices, that should work!



                  @media only screen and (min-width: 768px) and (max-width: 992px){
                  .full_section_inner{
                  display: flex;
                  justify-content: center;
                  }
                  }






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 14 '18 at 3:05

























                  answered Nov 14 '18 at 0:47









                  MartinBAMartinBA

                  7161213




                  7161213






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53291524%2fcenter-div-on-tablets%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      這個網誌中的熱門文章

                      Hercules Kyvelos

                      Tangent Lines Diagram Along Smooth Curve

                      Yusuf al-Mu'taman ibn Hud