0
Welcome Guest! Login
0 items Join Now

cant center div on small screen

    • ancle's Avatar
    • ancle
    • Jr. Rocketeer
    • Posts: 25
    • Thanks: 0

    cant center div on small screen

    Posted 9 years 5 months ago
    • Good evening !

      I basically have my language module inside the header of my page but now I addded an extra link which stands next to the rest of the languages and to redirect the site to a different website.

      The problem is i cant center them when the window goes small for mobile screens..
      I have added the link for the website inside the secure tab along with the login information . The name of the module is "header en"

      Thanks for your help
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: cant center div on small screen

    Posted 9 years 5 months ago
    • The way you've gone about that by floating elements makes it more difficult to change but Use this code...
      @media (max-width: 480px) {
      div#rt-header .rt-grid-6 .it_link, div#rt-header .myc4 div.it_link + div {
          float: none !important;
      }
      }
      @media (min-width: 481px) and (max-width: 767px) {
      div#rt-header .rt-grid-6 .it_link, div#rt-header .myc4 div.it_link + div {
          float: none !important;
      }
      }
      @media (min-width: 768px) and (max-width: 959px) {
      }
      @media (min-width: 960px) and (max-width: 1199px) {
      }
      @media (min-width: 1200px) {
      }
      
      This is how to create a custom CSS compatible with Gantry 4...

      Simply create a file called "<TEMPLATENAME>-custom.css" and put this file in the CSS folder of the template (where <TEMPLATENAME> is the name of the template as seen in template manager e.g. rt_iridescent would be rt_iridescent-custom.css). GANTRY4 will automatically load this CSS file. If you wish, you can also have browser specific files by appending, for example, "-ie9" making the filename "<TEMPLATENAME>-custom-ie9.css"

      Regards, Mark.
    • The following users have thanked you: ancle

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.062 seconds