Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #576921

    Hi,

    I am using a #smallpad1 div in a color box with some specific rules and it is working fine, but I need to have the same code in 4 divs such as: #smallpad1 #smallpad2 #smallpad3 #smallpad4

    This is my actual code:

    #smallpad1 div .av_one_fourth {
    margin-left: 1%;
    width: 24%;
    }

    Is there a way that I can apply it all at once without repeating the code?

    Thank you

    #577358

    Hi sitesme!

    You can do this enable class support to the theme elements http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/

    Then add a common class to each ID

    #smallpad1 .common-styles
    #smallpad2 .common-styles
    #smallpad3 .common-styles
    #smallpad4 .common-styles

    Write your common class once

    .common-styles {
    margin-left: 1%;
    width: 24%;
    }

    If this is not what you need please send us a link to your site with mockup so we can help you better.

    Regards,
    Vinay

    • This reply was modified 8 years, 2 months ago by Vinay.
    #577640

    Thank you Vinnie,

    It looks much more complicated than I though.

    I will simply add individual lines of CSS code just to make it easier, one for each ID basically.

    Thanks again for the explanation and will keep this in mind for the future.

    #577987

    Hey!

    You are most welcome!

    We are always here to help you.

    To put it in other words use a class name with all the ID’s that has repeating CSS and move the repeating CSS to one common class name.

    Hope this help!

    Regards,
    Vinay Kashyap

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