0
Welcome Guest! Login
0 items Join Now

image modification in gantry 5

    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 95774
    • Thanks: 12656
    • Web Designer/Developer

    Re: image modification in gantry 5

    Posted 7 months 1 week ago
    • fw114 wrote:
      It would make much more sense, if the template aka css, fits the image into the block instead of editing every image that it fits to the template.
      don't you think ?

      No it wouldn't because it's a background image and the size of the container changes shape as you reduce the viewport size. In a mobile is more square in a desktop it's more a rectangle.

      Buyt again if you want to force it so the image always fits you can do that with more CSS but again it will look awful....
      .g-newsslider .g-newsslider-slides .owl-item .g-newsslider-slides-item-image {
         background-size: contain;
      }

      To create a custom CSS compatible with Gantry 5 please read this http://docs.gantry.org/gantry5/tutorials/adding-a-custom-style-sheet .

      Remember to recompile CSS from base outline too.


      Remember this is a BACKGROUND image not a FOREGROUND image and so the size of the image has absolutely no bearing on the size of the container in which it resides. If you use the Swiper particle instead of the newsslider particle then there is an option within that to use a FOREGROUND IMG instead of background image.


      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.077 seconds