-
AuthorPosts
-
November 30, 2020 at 12:46 pm #1263941
Hi, ENFOLD team.
Please let me know if there´s a simple way to get a gap between the portfolio itmes without create one at the sides.
I already tried out different ways by watching at similar posts but unfortunatelly I can´t fix it by my own.
So I would be very grateful for your help.Thank you very much in advance.
Best regards, fkm
December 2, 2020 at 4:54 pm #1264529Hey fkm,
Thank you for using Enfold.
How did you add the gap or space between the items? You should be able to remove that space for every 4th item in the row using nth child selectors. Please check the following article for more info about nth child selectors.
// https://css-tricks.com/almanac/selectors/n/nth-child/
// https://css-tricks.com/how-nth-child-works/
// https://www.w3schools.com/cssref/sel_nth-child.aspBest regards,
IsmaelDecember 3, 2020 at 10:59 am #1264714Hey Ismael,
thank you very much for your reply/help.
I just switched the code to create the gap to:
.grid-entry .inner-entry {
margin-right: 20px;
}Same effect (and same issue).
Next I tried to find a solution by trying out different things using the instructions (following the links you gave me).
Something happened too, but not exactly what I wanted to achieve.
In all honesty, I’m not familiar with programming languages.
Naively, I thought that there was a simple code for it that I just had to insert into the Quickk CSS field.Best regards, fkm
December 4, 2020 at 4:53 am #1264928Hi,
Thanks for the update. I’m not sure if this will work, but please try this CSS in order to target every fourth element, and give it a margin-right of 0:
.grid-entry .inner-entry:nth-child(4n) { margin-right: 0 !important; }
Best regards,
RikardDecember 4, 2020 at 11:17 am #1264973Hi Rikard,
thank you very much for your immediate reply and the code.
I just tried but unfortunatelly it seems like nothing changed.Also I played around with the same principle/code changing the paddings.
Something happend here: The fourth image was enlarged to the far right (as desired).
However, it also got higher and so it was different from the first three images.Best regards, fkm
December 6, 2020 at 4:35 am #1265223Hi,
Thanks for the update. You could try to adjust the container element instead like so:
.page-id-22 #av_section_1 .container { max-width: 1280px; }
Let us know if you are ok with those results.
Best regards,
RikardDecember 8, 2020 at 2:21 pm #1265756Hi, Rikard.
Thank you very much for your reply.
Unfortunately, this code does not lead to a satisfactory result.Is there a way to only define the inner distances of a row and to leave the outer margins/paddings at 0 Pixels (also on other views, e.g. of mobile devices with fewer elements in a row)?
Thanks in advance.
Best regards, fkm
December 14, 2020 at 12:27 am #1266965Hi,
Sorry for the very late reply and thanks for the links. Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:#av-sc-portfolio-1 > div > div.first > article { margin-left: 0 !important; } #av-sc-portfolio-1 > div > div.grid-loop-4 > article, #av-sc-portfolio-1 > div > div.grid-loop-8 > article, #av-sc-portfolio-1 > div > div.grid-loop-12 > article, #av-sc-portfolio-1 > div > div.grid-loop-16 > article, #av-sc-portfolio-1 > div > div.grid-loop-20 > article, #av-sc-portfolio-1 > div > div.grid-loop-24 > article, #av-sc-portfolio-1 > div > div.grid-loop-28 > article { margin-right: 0 !important; }
After applying the css, please clear your browser cache and check.
Best regards,
MikeDecember 14, 2020 at 11:36 am #1267074Hi, Mike.
No problem, I’m glad you answered – thank you very much.
The code works in the way that the 4th elements of each row are now aligned to the right as desired.
But that´s because those elements are enlarged and so they are different to the others (please see the screenshots).Kind regards, fkm
December 15, 2020 at 3:06 pm #1267486Hi,
Thank you for pointing that out, so instead of removing the right margin on every fourth item, let’s remove 25px of right side padding to make up this difference.
So please remove this part of the css:#av-sc-portfolio-1 > div > div.grid-loop-4 > article, #av-sc-portfolio-1 > div > div.grid-loop-8 > article, #av-sc-portfolio-1 > div > div.grid-loop-12 > article, #av-sc-portfolio-1 > div > div.grid-loop-16 > article, #av-sc-portfolio-1 > div > div.grid-loop-20 > article, #av-sc-portfolio-1 > div > div.grid-loop-24 > article, #av-sc-portfolio-1 > div > div.grid-loop-28 > article { margin-right: 0 !important; }
and add this css:
#geschichte > div { padding-right: 25px !important; }
Then clear your browser cache and check.
Best regards,
MikeDecember 16, 2020 at 1:36 pm #1267821Hi, Mike.
Thanks for your reply/help.
It works fine on big screens (desktop, tablet) – that’s great, thank you so much!
Only on smartphones there is still too much space on the right (please see the screenshots).
Do you have a similarly great idea for this?Thanks in advance.
Best regards, fkm
December 17, 2020 at 3:10 pm #1268139Hi,
Glad to hear this helped, for mobile please try this css:@media only screen and (max-width: 767px) { #top #wrap_all #geschichte > div { padding-right: 0 !important; } }
Then clear your browser cache and check.
Best regards,
MikeDecember 17, 2020 at 3:40 pm #1268147Hi, Mike.
Thank you very much for your immediate reply.
Unfortunately this code doesn´t fix it (seems like nothing happens).
Did I do sth wrong?Thanks in advance.
Best regards, fkm
December 20, 2020 at 1:19 am #1268698Hi,
Sorry for the late reply, your test page seems to have been removed, do you have a new URL?Best regards,
MikeJanuary 11, 2021 at 6:19 pm #1271668Hi, Mike.
Thank you very much for your reply and please excuse my late one (I just came back from an extended christmas vacation).
You are right, I moved the website to the real domain.
My mistake for not informing you. Sorry for that.
The issue is still the same. Please help.Thanks in advance.
Best regards, fkm
January 12, 2021 at 12:18 pm #1271856Hi,
Welcome back and thanks for the link, please try this css:@media only screen and (max-width: 767px) { .responsive #top #wrap_all #projekte .grid-entry.flex_column { width: 104% !important; } }
After applying the css, please clear your browser cache and check.
Best regards,
MikeJanuary 14, 2021 at 12:08 pm #1272377Hi, Mike.
Thank you very much for your reply – the code works very well.
It’s not pixel-perfect (of course, because it’s given as a percentage and I assume that technically there is no other simple option either), but it still looks great on most devices (I checked via developer simulations of the browser and on my smartphone).
I am very happy about it and appreciate it – thanks again.Only in landscape format is it a bit too wide, so I made the following adjustments:
@media only screen and (max-width: 767px) {
.responsive #top #wrap_all #projekte .grid-entry.flex_column {
width: 103% !important;
}
}@media only screen and (max-width: 450px) {
.responsive #top #wrap_all #projekte .grid-entry.flex_column {
width: 106% !important;
}
}Is this (css) technical legitimate, so I can keep it like that?
Thanks in advance.
Best regards, fkm
January 14, 2021 at 3:00 pm #1272413Hi,
Glad to hear this helped and you are happy, your css is sound, but you could use(orientation: landscape)
or(orientation: portrait)
like this:@media only screen and (max-width: 767px) and (orientation: landscape) { .responsive #top #wrap_all #projekte .grid-entry.flex_column { width: 103% !important; } }
this would allow you to be more specific.
Best regards,
MikeJanuary 19, 2021 at 10:37 am #1273620Hi, Mike.
Thank you very much for the additional information – I am always happy to learn something new.
This matter is now successfully done.Thanks again to the Enfold team.
Best regards,
fkmJanuary 19, 2021 at 1:54 pm #1273707Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Portfolio grid: space between the items (but not on the outer edges)’ is closed to new replies.