Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Problem with „Max width of content“

Problem with „Max width of content“

Scheduled Pinned Locked Moved General Discussion
5 Posts 2 Posters 166 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benni
    wrote on last edited by
    #1

    Hey guys,

    i have an issue I could use some help with…

    I basically want the content of a site to stop resizing after it surpasses a certain width in px.
    You already added the „Max width of content“ to lay options, which is nice, but I also want the row gutters, offsets and everything else that is set in % to stop resizing.

    Is there an easy way to do this?
    Or do I have to use a media query and change every % to px (and figure out the right px)?

    Any help and direction would be appreciated :)

    Cheers
    Benjamin

    1 Reply Last reply
    0
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by Richard
      #2

      Dear Benjamin

      @benni

      Just curiously why does max width of content not work for you? the Gridder widths should stop enlarging at some point?

      If not:
      I think you will need to target the Row's, columns, margins specifically, Unfortunately -- i may be wrong - -but i don't think there will be a default Class that you can simply apply all px to at a certain point.

      I haven't done this myself but keep the viewport a certain size after a certain point may be a much easier trick for you to work with on large screens:

      Something like:

      https://stackoverflow.com/questions/29595612/how-to-prevent-site-from-being-responsive

      Or googling similar actions


      Best wishes 🌝
      Richard
      1 Reply Last reply
      0
      • B Offline
        B Offline
        benni
        wrote on last edited by
        #3

        Hi Robert,

        thank your for your reply!.

        I found a solution to my problem.

        First of let me explain again what my problem was…

        I set the max width of content to 1680 px and created a layout with offsets on lots of images.

        The gridder width stopped enlarging as expected :)
        But this didn't stop the images with offsets from adjusting their position according to the browser width.
        So on a really big screen the offset images would be offset way too much in relation to the rest of the content.

        My solution for this was to use the transform() CSS function instead of using the offset in the gridder menu.

        This way the offset stops enlarging after the browser reaches the specified max width.

        For everyone who runs into the same issue, here is what you have to do…

        Give the element you want to offset an ID and then use the custom CSS option to define the offset via the translate() CSS function.

        Here is an example of what your CSS could look like:

        #img-1 {
        transform: translateY(-30%);
        }

        This bases the offset on the width of the image you gave the ID to.

        I hope I explained it in a way that is understandable :)

        1 Reply Last reply
        0
        • B Offline
          B Offline
          benni
          wrote on last edited by
          #4

          Sorry Richard, I just saw that I called you Robert 😉

          1 Reply Last reply
          0
          • RichardR Offline
            RichardR Offline
            Richard
            Global Moderator
            wrote on last edited by
            #5

            Dear @benni

            No worries calling me Robert! ⭐️

            Thank you for the great solution that will help others 👍

            Give the element you want to offset an ID and then use the custom CSS option to define the offset via the translate() CSS function.

            Here is an example of what your CSS could look like:

            #img-1 {
            transform: translateY(-30%);
            }
            

            This bases the offset on the width of the image you gave the ID to.


            have a wonderful day
            Richard
            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            I also code custom websites or custom Lay features.
            💿 Email me here: 💿
            info@laytheme.com

            Before you post:
            1. When using a WordPress Cache plugin, disable it or clear your cache.
            2. Update Lay Theme and all Lay Theme Addons
            3. Disable all Plugins
            4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

            This often solves issues you might run into

            When you post:
            1. Post a link to where the problem is
            2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
            3. If the problem is difficult to explain, post screenshots / link to a video to explain it
            Online Users
            arminunruhA
            arminunruh
            F
            francesco
            L
            lurchifon
            Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
            laytheme.com
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Search