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

    Hello,

    I insert an image in a block text, when I inspect it I see it’s included in a paragraph but when I look at the html code, no <p>. I’d like to delete the margin top / bottom of the p.

    My code : `<p class=”petit”>—  FRESHLY BAKED  —</p>
    <img class=”aligncenter size-full wp-image-1031″ style=”margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0;” src=”https://ciegeneralebiscuiterie.com/wp-content/uploads/2015/03/biscuits-icon.png&#8221; alt=”Compagnie générale de Biscuiterie” width=”43″ height=”43″ />`

    With the inspector :
    <p><img class="aligncenter size-full wp-image-1031" style="margin-top:0; margin-bottom: 0; padding-top: 0; padding-bottom: 0;" src="https://ciegeneralebiscuiterie.com/wp-content/uploads/2015/03/biscuits-icon.png" alt="Compagnie générale de Biscuiterie" width="43" height="43" srcset="https://ciegeneralebiscuiterie.com/wp-content/uploads/2015/03/biscuits-icon.png 43w, https://ciegeneralebiscuiterie.com/wp-content/uploads/2015/03/biscuits-icon-36x36.png 36w" sizes="(max-width: 43px) 100vw, 43px"></p>

    And I want to get rid of :

    p {
        margin: 0.85em 0;
    }

    Can u help ? tx !!

    #831935

    Hey newki75,
    Try this code in the General Styling > Quick CSS field:

    .wp-image-1031 p {margin: 0px !important;}

    Best regards,
    Mike

    #832038

    Hello,

    Unfortunately, this code doens’t work.

    #832143

    Hi there!

    Please try this instead:

    .flex_column.avia-builder-el-1 > .av_textblock_section  > .avia_textblock > p { margin:0 !important; }

    Please let us know if that helps!

    Best regards,
    Sarah

    #832153

    Yes it seems to work, I need to check if i didn’t change any of the design somewhere else.
    Tx !

    #832176

    Great! You can use a Code Block right before the section or column (instead of Quick CSS) if you want to be sure.
    I’ll keep this thread open for you for now, in case you need further help.

    Best regards,
    Sarah

    #832733

    Perfect, I didn’t notice the .avia-builder-el-1 so it’s just the element id.
    But when can I see it ? When I inspect this first div column, I see avia-builder-el-3. I’ve reproduce on the Chocolate column, I see 6, but I’ve entered .flex_column.avia-builder-el-4 and it works.
    I will be more difficult when I go down in the page or on another, so could you tell me where u see the number of the .avia-builder-el-number ?

    Tx !

    #832862

    Hi there!

    avia-builder-el-3 is the button element after the paragraph we were trying to fix.  avia-builder-el-1 is the 1/3 column (one of its classes is flex_column). For the Chocolate column, 6 is a button…What you need is the flex_column div.

    Basically, you need to see the div that wraps around the element you’re trying to fix. 
    It might be helpful for you to turn on the custom class field for ALB elements: kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/

    This way, you can assign classes like, “chocolate-col” or “biscuits-col” :)
    Best regards,
    Sarah

    #832932

    Awesome ! This line of code should be added in the theme version :-)

    #833234

    Hi,

    Great, glad you got it working. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #833276

    You can close it !

    #833457

    Hi,

    Thanks for letting us know. I’ll close the thread for now.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Image in a p ??’ is closed to new replies.