Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #1098229

    How can I change the size and layout (alignment) of the icon box?

    I dont want the box to take up all the space on the page. I would like the text to wrap around the icon box responsively– the same way the text wraps around an image that has alignleft

    please see this page, at the top is an image with text wrapping —this is the effect I want bu I want it with the icon box not the image:

    seems like a simple thing- but I cant figure out how to do it….

    I have a lot of places where I will be adding icon boxes with information – I want to be able to just insert them into the page that has text already and align the iconboxes to the left so that the text wraps around it responsively–if you reshape the window the text wrapping changes to fit the screen size.

    • This topic was modified 5 years, 6 months ago by mattsalamon.
    #1098797

    Hey mattsalamon,

    Thank you for using Enfold.

    Are you going to use the actual shortcode of icon box element? You can’t make the text wrap around the icon box if you’re going to insert it using the ALB. It has to be inserted as an actual shortcode inside a text or code block. You may need to turn on the custom css class field so that you can target that specific element directly.

    // https://kriesi.at/documentation/enfold/add-custom-css/#enable-custom-css-class-name-support

    Best regards,
    Ismael

    #1099015

    Hello Ismael,

    Can you please provide the css code I need to accomplish this effect?

    i will have many icon boxes inserted into text throughout the site

    Thanks

    #1100081

    Hi,

    Thanks for the update.

    Have you tried changing the class attribute of the image inside the iconbox from “alignnone” to “alignleft”? That should allow the text to wrap around the image.

    Best regards,
    Ismael

    #1100157

    This will cause the text INSIDE the icon box to wrap around the picture INSIDE the icon box. But what I want is for the text OUTSIDE the icon box to wrap responsively around the entire iconobx

    #1100396

    Hi mattsalamon,

    Can you please attach a mockup of what you’re trying to achieve?

    Best regards,
    Victoria

    #1101161

    yes- it is here:

    Notice how the text wraps around the image.

    I want this same effect- but I want the text to wrap around an iconBox. so replace the image with an icon box and you will have the effect I want.

    Resize the window and you will notice the text changing in response to the screen size change.

    #1101739

    Hi,

    Thanks for the update.

    You should add the actual iconbox shortcode inside the text block, then turn on the custom css class field so that we can target that specific text block or icon box element directly.

    // https://kriesi.at/documentation/enfold/intro-to-layout-builder/#turn-on-custom-css-class-field-for-all-alb-elements

    You can generate the iconbox shortcode from a separate post using the shortcode generator.

    The content of text block should look something like this once you have included the iconbox shortcode plus the actual content that should wrap around the icon box.

    [av_icon_box position='left' icon_style='' boxed='' icon='1' title='IconBox Title' link='' linktarget='' linkelement='' font_color='' custom_title='' custom_content='' color='' custom_bg='' custom_font='' custom_border='' av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='' av-medium-font-size-title='' av-small-font-size-title='' av-mini-font-size-title='' av-medium-font-size='' av-small-font-size='' av-mini-font-size='' av_uid='av-29zeuo' custom_class='av_wrap_icon_box']
    Icon Box Text
    [/av_icon_box] Text block content lorem ipsum dolor sit amet i am so osamu andsamu haha
    

    If you noticed, we added the custom_class parameter to the icon box shortcode and added the value “av_wrap_icon_box”. We can use that class attribute to change the style of the icon box.

    #top .iconbox.av_wrap_icon_box {
        width: 50%;
        float: left;
    }

    Best regards,
    Ismael

    #1101934

    Hello,

    I tried this but it doesnt really work

    I was able to get something sort of working by changing the shortcode to

    custom_class=’center_icon_box’

    not sure why that worked but it seems to have.

    pleaes see the example here:
    introOld2

    Now- I would like the text that is to the right of the icon box to have a little spacing- how can I accomplish this?

    #1102359

    Hi,

    Thanks for the update.

    You just changed the class attribute name and adjusted the css code above using that particular class attribute (center_icon_box). If you want to create space between the box and the text, add this css code.

    .center_icon_box {
        width: 40% !important;
        float: left !important;
        margin-right: 50px;
    }

    Best regards,
    Ismael

    #1102571

    Thank you this seems to have worked. Now- I have another issue with it– when you view the site via a mobile device- (like an iphone 10) I would like the icon box to take up the whole column.

    Right now- it is istill spliitting into 40% and does not look good on a phone screen

    #1102574

    Hi,

    Can you screenshot the issue?

    Best regards,
    Jordan Shannon

    #1102649
    #1102666

    Hi,

    Thanks for the update.

    You can adjust the width of the iconbox for smaller screens using css media queries.

    @media only screen and (max-width: 767px) {
        .center_icon_box {
            width: 100% !important;
            float: none !important;
        }
    }

    Best regards,
    Ismael

    #1102928

    Thanks Ismael–that works perfectly!

    #1102981

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Change size and layout of icon box’ is closed to new replies.