-
AuthorPosts
-
June 2, 2022 at 11:11 am #1353899
Hi Enfold team,
I´m using the stretched layout for my website and would like to reduce the side margins a lil bit.
Please let me know if there is a quick way to do this.
Please see screenshot.Thank you very much for your reply in advance.
Best regards,
fkmJune 2, 2022 at 2:25 pm #1353922Hey fkm,
Please try the following in Quick CSS under Enfold->General Styling:
#top .av_header_stretch .container { width: 98%; }
Best regards,
RikardJune 2, 2022 at 3:33 pm #1353928Hey Rikard,
thank you very much for your quick reply/help.
This CSS works fine for large screens (desktop), but it makes the margin too small on tablets and smartphones.
So I tried the following addition and it seems to work in an acceptable way:@media only screen and (min-width: 1200px) {
#top .av_header_stretch .container {
width: 98%!important;
}}Although I´d prefer pixel-precise constant margins for all devices (desktop and mobile), it’s still okay as it is now, if that would be too complicated!?
Thanks a lot for another reply in advance.
Best regards,
fkmJune 2, 2022 at 5:08 pm #1353949Hi,
You can check if vw might work better?
#top .av_header_stretch .container { width: 98vw !important; }
Best regards,
RikardJune 3, 2022 at 10:45 am #1354004Hi Rikard,
thank you very much for your quick response again.
Unfortunately, vw doesn’t seem to make a difference.Best regards,
fkmJune 3, 2022 at 2:31 pm #1354031Hi,
Ok. That’s as good as it gets I guess, unless you want to use fixed pixel values.
Best regards,
RikardJune 7, 2022 at 9:40 am #1354363Hi Rikard,
thank you very much for your reply.
If that’s possible, I would even prefer fixed pixel values for all devices.
Please let me know how to do.Thanks a lot in advance.
Best regards,
fkmJune 7, 2022 at 10:26 am #1354366Hi,
You can simply change the value in the CSS I sent previously:
#top .av_header_stretch .container { width: 1200px !important; }
Best regards,
RikardJune 7, 2022 at 11:59 am #1354374Hi Rikard,
is it also possible to define not the width of the website as fixed pixel value, but the spacing from the margins?
Thanks for another reply in advance.
Best regards,
fkmJune 7, 2022 at 2:45 pm #1354393Hi,
That might be possible, you can try something like this:
#top .av_header_stretch .container { width: 100% !important; margin: 0 20px; }
Best regards,
RikardJune 7, 2022 at 4:07 pm #1354420Hi Rikard,
that’s pretty close. :)
On the left side of the page the menu moves exactly those 20px to the right on all devices as desired.
However, the logo on the right side also moves to the right instead of to the left so the logo cut off (please see screenshot).
If that could be fixed, the goal would be achieved.
Please help.Thanky you very much in advance.
Best regards,
fkmJune 7, 2022 at 5:58 pm #1354433Hi,
Thanks for the screenshots, I can’t see that happening on my end using Chrome though. In which browser are you getting those results?
Best regards,
RikardJune 8, 2022 at 10:01 am #1354497Hi Rikard,
thank you very much for your reply.
I removed the CSS code after taking the screenshot in Firefox.
Now it’s back in and the issue is also visible in Chrome on my end.
Please check again – thanks a lot in advance.Best regards,
fkmJune 8, 2022 at 12:03 pm #1354511Hi,
Thanks for that. I’m seeing the logo flush to the right edge, but if you want to adjust it a bit, then please try this CSS as well:
.html_header_top #top .av_logo_right .logo { right: 20px; }
Best regards,
RikardJune 9, 2022 at 3:50 pm #1354683Hi Rikard,
thank you very much for your reply.
I am a little bit confused that you were seeing the logo flush to the right edge because it was always cut off on different computers in different browsers here. Please see screenshot (that was the way I was seeing it) and please let me know if it looked different on your end?
And thank you very much for the CSS.
Those allowed me to make the adjustments exactly as I wanted:@media only screen and (min-width: 767px) {
#top .av_header_stretch .container {
width: 100% !important;
margin: 0 35px;
}}@media only screen and (min-width: 767px) {
.html_header_top #top .av_logo_right .logo {
right: 52px;
}}Now it looks great. So if that’s technically okay, the problem is solved.
Thanks a lot in advance for a final reply in this case.
Best regards,
fkmJune 9, 2022 at 7:29 pm #1354709Hi,
Thanks for the update. I’m not sure if it looked that way or not, maybe it was cut off after all. Anyway, it looks nice now though :-)
Best regards,
RikardJune 10, 2022 at 9:21 am #1354763Hi Rikard,
you´re right, so the topic is successfully completed (please feel free to close it).
Thank you very much for your support.
Best regards,
fkmJune 10, 2022 at 11:40 am #1354787Hi,
Thanks for letting us know, I’ll go ahead and close this thread for now then. Please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘Reduce site margins in stretched layout’ is closed to new replies.