Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #806142

    Please see http://dev.mediabox.ca/3/events/national/westerntest/ for reference

    I am trying to gave a few icons side by side, but hey seem to stagger no matter what I try :(

    Any ideas? Thank you in advance!

    PS. Because of my layout, in many cases I will not be able to use Layout Elements or tables to set the icons side by side.

    #806481

    Hey GabrielSenn,

    It looks like there is a line break tag between them which is causing that, could you try removing all spaces and line breaks between them in the editor please?

    Best regards,
    Rikard

    #816979

    Hello Rikard,

    You are correct, the <BR> are causing the problem. However, I am not inserting them! It is either ENFOLD or WP doing the did :(

    I have tried a million things and finally figured out that the problem happens when I have the icon elements inside a layout element. Please see this sample:

    Any suggestions, please?!

    • This reply was modified 7 years, 5 months ago by GabrielSenn. Reason: Sample URL not displaying properly?
    #817073

    Hi,

    Thanks for the example page, could you post login details in private so that we can have a closer look please?

    Best regards,
    Rikard

    #817277

    Hey Rikard,

    Thank you for the prompt reply! Info attached.

    Please, if possible, avoid turning off plugins. I’ve already removed those I considered potentially responsible for the problem.

    Cheers,
    Gabriel

    #817589

    Hi,

    A line break is added automatically after the elements inside of layout elements, that is why it’s behaving like that. I’m not sure when you would have to have them inside of the 1/1 element though, isn’t it easier doing it the way you did it in the first section? You could also try to use 1/4 elements to display them all inline.

    Best regards,
    Rikard

    #817877

    Hello Rikard,

    It is inside a 1/1 as an example. I changed the sample from 1/1 to 3/4 just to show you the issue persists. Any solutions?

    Cheers,
    Gabriel

    #818080

    Hi,

    Ok, I see what you mean, that is not what I’m saying. I’m just asking you why you need them to be inside of the layout element, why not keep them outside if that works?

    Best regards,
    Rikard

    #818234

    Rikard, I can think of several reason why I would need them inside a layout element. Just to name one such sample, the attach illustration (which is something I actually will need to do on some pages) shows it.

    Layout element’s are Enfold’s features and as such, I don’t understand why Enfold is dropping the <br> in there.

    Is there a solution?

    Icon problem sample

    #818760

    Hi GabrielSenn,

    Could you pleas enable the Advanced Layout Builder debug mode, so that we can see what shortcodes are generated. Here is how to do it.

    Best regards,
    Victoria

    #818852

    Done Victoria. Please let me know once I can change it back. Thank you!

    #818946

    Hi GabrielSenn,

    I did a test on my instance, did not get the br and on yours got line breaks, they are annoying. Do you have auto p enabled? That could be the reason. https://wordpress.stackexchange.com/questions/200469/new-method-to-disable-wpautop-after-wp-4-3

    Best regards,
    Victoria

    #818990

    Do you have auto p enabled?

    Nope. That’s not it.

    I am working around it for now, but a solution would be best.

    Thanks again!

    #819329

    Hi GabrielSenn,

    Here is the code you can adjust to strip br and put in your funtions.php

    
    /* remove all nbsp's when content is saved */
    add_filter('content_save_pre','remove_buggy_nbsps',99, 1);
    
    function remove_buggy_nbsps($content) {
       //strip both types of non-breaking space in case NGG or similar is installed
       $content = str_replace(' ',' ',$content); 
       $content = str_replace('\xc2\xa0',' ',$content); 
    
       return $content;
    }
    

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #819511

    Hello Victoria, Thank you for the quick response time on this.

    So… Will this not affect ALL content? Remove <BR>‘s weather they are needed or not?

    I’ll try to see if I actually use any <BR>‘s in my site and if I do not, I’ll apply this fix.

    Cheers!

    • This reply was modified 7 years, 5 months ago by GabrielSenn.
    #820781

    Hi,

    Please feel free to let us know if there is anything else we can do for you.

    Thank you very much

    Best regards,
    Basilis

    #820856

    Thank you Basilis! Yes, it would be great too know if this can be resolved without affecting all of the site by removing <BR>‘s when they are needed.

    #821206

    Hi GabrielSenn,

    You can adjust that code, to only apply to the page with those icons and unnecessary breaks. That way it will not affect other pages.

    Best regards,
    Victoria

    #821306

    That’d be super Victoria. Thank you!!!

    Could you please advise on how I’d do that? (sorry about my ignorance on this)

    #821418

    Hi,

    You can wrap the code with a conditional tag to make it apply on specific pages: https://codex.wordpress.org/Conditional_Tags
    Hope this helps.

    Best regards,
    Nikko

    #821422

    Thank you Nikko! It does.

    Cheers all.

    #821443

    Hi,

    Glad we could help. Thanks for using Enfold :)

    Best regards,
    Nikko

Viewing 22 posts - 1 through 22 (of 22 total)
  • The topic ‘Content Element > Icon > How can I align a few icons side by side?’ is closed to new replies.