Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1248961

    Hi All,
    I am trying to set up a page in which to insert code blocks for PC and iPhone / mobile. Respectively I inserted two blocks with the code for 3 columns on PC and 2 columns on iPhone setting where to hide/not consider this code.
    What I get is that I always get 2 columns even on PC instead of 3 …
    Where am I wrong if I’m wrong?

    #1249259

    Hey amepro,

    Please provide a link to the site/page in question so we can look into this issue further.

    Best regards,
    Jordan Shannon

    #1249306

    Hi Jordan, thi is the link
    Page with problem
    This page has been structured with two code blocks the first one for PC only and the second one for screens less than 479 px

    Thanks

    #1249817

    Hi,

    Thanks for that. First off, could you try updating the theme to the latest version (4.7.6.3) to see if that helps please? https://kriesi.at/documentation/enfold/how-to-install-enfold-theme/#theme-update. If not then please post admin WordPress login details in private so that we can have a closer look.

    Best regards,
    Rikard

    #1249863

    Hi,
    I updated to Ver 4.7.6.3 but nothing has changed. Herewith I send info to access the backoffice

    Thanks

    #1250247

    Hi,

    Thanks for that. If you want some of your CSS to only apply to mobile then you will have to wrap it in a media query, like so:

    @media only screen and (max-width: 767px) {
    .lcp_catlist { /*#lcp_instance_0*/
    -webkit-column-count:2;
    -moz-column-count:2;
    column-count:2;  /* il nr è la quantita delle colonne che vogliamo creare*/}
    }

    Best regards,
    Rikard

    #1250300

    Hi Rikard,
    just to understand, so if I activate two sections of code on the page one for PC and one for mobile these are not read / do not work?
    Also, since I have to handle exceptions, right at the page level, putting it in an external CSS file becomes problematic because I can’t define the variable with different names …
    What do you advise me to do?

    #1250398

    Hi,

    The options to show/hide elements will only affect the visibility, that means that if you add code to them then that code will apply anyway. If you want the code to only apply to some screen sizes then you will need a media query like in my example.

    I’m not sure what you mean by exceptions though, could you try to explain that a bit further please?

    Best regards,
    Rikard

    #1250577

    By exceptions I mean the various possibilities that I need depending on the length of the array / list that is generated and, I may need 1/2/3/4/5 columns to prevent the page from becoming very long. It is clear that on the mobile they must always be reduced to 1 or 2 columns for visibility reasons. Just a question: if in the code section I insert the <style> tag with its mediaquery inside it works or, should I use a text section?

    Thank you and Best Regards
    Maurizio

    #1250758

    Hi Maurizio,

    Thanks for the update. Your code should work in either the code block or text block element. You have the possibility to automatically insert the style tag in the code block though, so you might want to stick to that. If you want different codes for different screen widths then you can use different media queries, like this for example:

    @media only screen and (min-width: 480px) and (max-width: 767px) {
      code goes here
    }

    The above code will target medium to large mobile screens, and this will target all the sizes below that:

    @media only screen and (max-width: 479px) {
      code goes here
    }

    You could also simply add your CSS to Quick CSS, if you want the CSS to apply globally. Then you won’t have to add CSS on individual pages.

    Best regards,
    Rikard

    #1250784

    Hi Rikard
    Thank you for all

    #1251060

    Hi,

    Thanks for the update, I’m glad that we could help. Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.