No margin on the image

  • Author
    Posts
  • #161539

    nestorvr18
    Member

    Hi Taras,

    On my home page, I would like my first image (class=”wp-image-337″) to be full, without margin on the top, bottom and left. Is it possible using CSS?
    I’ve tried margin-left: 0px or margin-top and I also have the image full screen.

    What can I do to have attached to the header, to the left and to the next module?

    Thank you!

    Kind regards,

    The blog I need help with is nestorvr.com.

    #161548

    tarasdashkevych
    Theme Author

    Hello Nestor,

    To modify the styles of your Columns block (where the image is located), please add a custom CSS class to this block: https://wordpress.com/support/adding-additional-css-classes-to-blocks/

    For example, you can add sobre-mi. Once the class is added, go to your custom CSS panel, and add this CSS:

    
    .wp-block-columns.sobre-mi {
      padding: 0;
      margin-bottom: 0;
    }
    

    Please let me know if you have any additional questions.

    Kind regards,
    Taras

    #161776

    nestorvr18
    Member

    Hi Taras,

    I added this CSS as you suggested, and it works perfectly thank you so much!
    The thing is that now the second column with the text has no padding on the margins on the mobile version.

    I’ve tried to add padding on the second column’s left and right with:

    @media (padding: 20x) {
    wp-block-columns alignfull.sobre-mi {
    padding: 20;
    }

    It doesn’t work, there’s might be some mistake there. I like how it is on desktop but in the mobile version, the column with text has no blank space on the margins, I would like to introduce there some padding. Is it possible?

    Referring to: nestorvr.com the first block column, the first paragraph and the title.

    Thank you as always for the support!

    Kind regards,

    #161785

    tarasdashkevych
    Theme Author

    Hello Nestor,

    Do you want to have padding for the entire Columns block in the mobile views, or just for the second column?

    Kind regards,
    Taras

    #161797

    nestorvr18
    Member

    Hi Taras,

    It would be just for the second column, the one with the text on it.

    Thank you!

    Kind regards,

    #161800

    tarasdashkevych
    Theme Author

    Nestor,

    Please use this custom CSS to add paddings to the second column in this block in mobile views:

    
    @media (max-width: 782px) {
      .wp-block-columns.sobre-mi > .wp-block-column:nth-child(2) {
        padding: 20px 40px;
      }
    }
    

    Let me know if you have any additional questions.

    Kind regards,
    Taras

    #161809

    nestorvr18
    Member

    Thank you so much, I appreciate it!

    I’ll mark it as fixed.

    Kind regards,

    #161819

    tarasdashkevych
    Theme Author

    You are very welcome, Nestor!

    Kind regards,
    Taras

The topic ‘No margin on the image’ is closed to new replies.