Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Layout max-width

    General Discussion
    5
    15
    1981
    Loading More Posts
    • 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.
    • F
      florianhaiduk last edited by

      Hi everyone

      Great theme, great work.

      I have only one question:
      Is it possible to set a max width for the whole layout?
      1200px for example.

      Thanks,
      Florian

      1 Reply Last reply Reply Quote 0
      • arminunruh
        arminunruh Global Moderator last edited by

        Thanks!
        Yeah. Go to "Lay Options" -> "Misc Options" and you can enter this code into the field "Custom CSS for Desktop Version":

        #main-region {
          max-width: 1200px;
          margin-left: auto;
          margin-right: auto;
        }
        
        1 Reply Last reply Reply Quote 0
        • F
          florianhaiduk last edited by

          It works!
          Thanks!

          1 Reply Last reply Reply Quote 0
          • M
            MAN last edited by

            Hi! Is it possible to fix the max-width for the header too? I mean: logo on the left, menu on the right, aligned with the limited width content.

            Thanks

            1 Reply Last reply Reply Quote 0
            • arminunruh
              arminunruh Global Moderator last edited by

              Right now thats not possible no :/
              will write that down and code it as a feature one day!

              1 Reply Last reply Reply Quote 0
              • M
                MAN last edited by

                That would be great... Is it possible for the moment to trick it with some CSS? I'd really appreciate it!

                1 Reply Last reply Reply Quote 0
                • arminunruh
                  arminunruh Global Moderator last edited by

                  Hey MAN, nah this one's not really easy to do with a quick css fix :/

                  1 Reply Last reply Reply Quote 0
                  • M
                    MAN last edited by

                    Hey Armin,

                    I saw you added this feature, but it seems not to work properly. If, for example, my title and my layout had a 2% left space, once it gets the max width the new value override the title's left space data, and they show unaligned...

                    Thanks

                    1 Reply Last reply Reply Quote 0
                    • arminunruh
                      arminunruh Global Moderator last edited by

                      hey MAN for me it works but yea maybe there is a bug.

                      What is your website address? Which browser are you using?

                      1 Reply Last reply Reply Quote 0
                      • H
                        hellllo last edited by hellllo

                        Hey Armin,

                        i just read that there is a feature to fix the header-width when using

                        #main-region {
                        max-width: 1200px;
                        }

                        It doesn’t seem to work with my Chrome. Or did i get sth wrong?
                        Thanks!

                        1 Reply Last reply Reply Quote 0
                        • arminunruh
                          arminunruh Global Moderator last edited by

                          hey hellllo!

                          In "lay options" -> "misc options" there u have these two options:
                          Screen Shot 2016-08-27 at 11.07.08.png

                          Did you use these two options? Meaning did you enter "1200" in the "Max width of content" field and checked "Apply max width of content to logo and menu"?
                          Can I have a link to your website to see the problem?

                          H E 2 Replies Last reply Reply Quote 0
                          • H
                            hellllo @arminunruh last edited by

                            @arminunruh

                            hey armin,

                            i just found out why it didn't work.
                            the max-width somehow messed up with the margins of title image menu bar and gridder defaults ( it was all put to 2%). The contend scaled in the right way but the menu bar didn’t – it was still stuck at the 2%.

                            I put everything to zero.
                            Now it’s neatly aligned left an right and the max-width is applied correctly.

                            thanksalot
                            you are doing great work!

                            1 Reply Last reply Reply Quote 0
                            • arminunruh
                              arminunruh Global Moderator last edited by

                              ah yea, now i see it. the problem is the max-width includes the left and right frame of the layout :/
                              hmmm i need to fix this

                              1 Reply Last reply Reply Quote 0
                              • E
                                ERSI19 @arminunruh last edited by

                                @arminunruh hi armin, is this possibility to define the max. width still in the new version 5.2.4 I can´t find it and tried also put the code #main-region {
                                max-width: 1200px;
                                margin-left: auto;
                                margin-right: auto;
                                }

                                to CSS without success. thanks

                                1 Reply Last reply Reply Quote 0
                                • arminunruh
                                  arminunruh Global Moderator last edited by

                                  its in lay optionsScreenshot 2023-02-10 at 14.14.25.png

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post

                                  Try this to fix issues before you post:

                                  Use the Search Feature. Maybe there is already a solution to your issue.

                                  1. Update Lay Theme and all Lay Theme Addons
                                  2. Disable all Plugins
                                  3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
                                  4. Now see if your problem solved itself
                                  5. Go here, see if your problem is listed here:
                                  Troubleshooting

                                  When you post:
                                  1. Post a link to where the problem is
                                  2. If the problem is difficult to explain, post screenshots / link to a video to explain it

                                  Thanks!

                                  Online Users

                                  A
                                  M
                                  L
                                  T

                                  Recent Topics

                                  • A

                                    Broken images

                                  • L

                                    Hide mobile menu, when scrolling down

                                  • J

                                    Imagehover addon show mouseover state

                                  • F

                                    X-button (close) on category page

                                  laytheme.com