0
Welcome Guest! Login
0 items Join Now

Manage "g-grid" and "g-block size-#" on mobile devices

  • Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • Below is my page on 1280px and 480px devices.
      and the code :
      <div class="g-grid">
      <div class="g-block size-20"><img src="images/powered_by.png" alt="powered by" /></div>
      <div class="g-block size-5">&nbsp;</div>
      <div class="g-block size-75">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus aliquet magna enim, id commodo quam euismod rutrum. Mauris at egestas dui. Curabitur auctor diam ac varius efficitur. Curabitur dignissim vehicula neque id varius. Ut aliquet tincidunt lacinia. Morbi gravida facilisis auctor. Nulla facilisi. Nullam in tellus quam! Sed id ligula sit amet felis tempor tincidunt vulputate quis dolor? Duis ultrices sit amet velit nec sagittis. Nulla porta neque non interdum semper? Sed at ultricies massa, sit amet egestas augue. Nulla vel iaculis nulla?</div>
      </div>
      I would like to get on mobile devices the image and the paragraph on the same line. How is it possible ? In that size my HTML stays as It was on 1280px wide.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • Could you please post a URL to your site (this can be done in the secure area tab if you prefer) so we can look for you. Without a link to page where the problem is on your site it is quite hard for us to provide the best solution due to so many variables. We try to provide file names and line numbers for code changes and if changes have already been made then our advice may be incorrect.


      Regards, Mark.
    • 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.
  • Re: Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • Now you can access to the BO
      MrT wrote:
      Could you please post a URL to your site (this can be done in the secure area tab if you prefer) so we can look for you. Without a link to page where the problem is on your site it is quite hard for us to provide the best solution due to so many variables. We try to provide file names and line numbers for code changes and if changes have already been made then our advice may be incorrect.


      Regards, Mark.
    • Last Edit: 8 years 7 months ago by Laurent BRIERE.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • Thanks for the login - all I need now is a url and I'll be able to look for you :)

      Regards, Mark.
    • 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.
  • Re: Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • Gantry 5 is deliberately designed to stack the blocks one above the other at the point the viewport gets too small (to make a better display). You can change with this with custom CSS but I think it's a really bad idea to do this as on mobile devices that image will be so tiny as to be unreadable and the text will be in an extremely narrow column next to it (see my screenshot to illustrate what will happen on mobile). Left to right columns under up as template width top to bottom blocks with Gantry 5 - again as this is a major feature of the framework I think it's not a good idea to change it.

      Are you really sure you want to do this - I counsel against it.

      Regards, Mark.
    • Last Edit: 8 years 7 months ago by MrT.
    • 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.
  • Re: Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • I know that ;-)
      In fact I would like to insert an icon + spacer + text

      ... I edited the article homepage
    • Last Edit: 8 years 7 months ago by Laurent BRIERE.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • See how I've altered your article now - there a different way to do it without using the gantry grids and modifying them. I think it's also better the way it wraps around the image and now it won't stack either. I have used inline styling just to show you but you should use classes instead in a custom CSS file.

      Regards, Mark.
    • 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.
  • Re: Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • Thanks Mr T but...
      The text column on the right (fluid height) gives the height to the first one (Icone)... That why I decided to use a grid system instead of floated elements as you did ;-)
      An other solution ? :(
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Manage "g-grid" and "g-block size-#" on mobile devices

    Posted 8 years 7 months ago
    • If you use the grid system then it will behave as the Gantry 5 grid system - which apparently you don't want. Therefore you don't want to be using the grid system. So, you need to take a DIY approach creating your own classes using the flex box model. I really think it's the wrong thing to do to start altering the way that the gantry grids behave just to suit this one particular case.

      See https://css-tricks.com/snippets/css/a-guide-to-flexbox/

      Regards, Mark.
    • 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.059 seconds