Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #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

    #1264529

    Hey 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.asp

    Best regards,
    Ismael

    #1264714

    Hey 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

    #1264928

    Hi,

    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,
    Rikard

    #1264973

    Hi 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

    #1265223

    Hi,

    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,
    Rikard

    #1265756

    Hi, 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

    #1266965

    Hi,
    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,
    Mike

    #1267074

    Hi, 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

    #1267486

    Hi,
    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,
    Mike

    #1267821

    Hi, 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

    #1268139

    Hi,
    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,
    Mike

    #1268147

    Hi, 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

    #1268698

    Hi,
    Sorry for the late reply, your test page seems to have been removed, do you have a new URL?

    Best regards,
    Mike

    #1271668

    Hi, 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

    #1271856

    Hi,
    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,
    Mike

    #1272377

    Hi, 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

    #1272413

    Hi,
    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,
    Mike

    #1273620

    Hi, 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,
    fkm

    #1273707

    Hi,
    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

Viewing 20 posts - 1 through 20 (of 20 total)
  • The topic ‘Portfolio grid: space between the items (but not on the outer edges)’ is closed to new replies.