how can i make flex blocks imgs fullwidth on mobile ?

Posted in: Newspaper
Post count: 8

Hi,
i have installed newspaper theme and customizing using builder. All is working fine. i am changing the mobile layout i want to do flexblock imgs to fullwidth on mobile and title,excerpt in container width. how can i achieve this? i have inspect the blocks that has left,right padding if i remove that all the elements of block go to fullwidth, but i just want to make imgs fullwidth on mobile.
plz let me know what piece of code i change for that.? thank!

  • This topic was modified 5 years by usmanlive.
Post count: 35449

Hi,

If you want to do this only for flex blocks, then you can use tagdiv Composer and add on these elements some margins left and right with “-” like this -> https://i.imgur.com/Onr0a9Q.png

Hepe this will help you!
Thank you!

Post count: 8

Hi,
thanks for reply. i have add the margin but post content is also going to full width i just want to do the img on full width no the title and excerpt.

Post count: 8

Also plz let me know about the widget i have block 5 widget in sidebar how can i make that fullwidth img and padding around the title and meta.

Post count: 35449

Hi,

Another way is to use a custom css, you can try this one:
.td_module_flex_1 .td-image-container, .td_module_flex_3 .td-image-container, .td_module_flex_4 .td-image-container, .td_module_flex_5 .td-image-container, .td_module_flex_1 .td-thumb-css, .td_module_flex_3 .td-thumb-css, .td_module_flex_4 .td-thumb-css, .td_module_flex_5 .td-thumb-css {
width: calc(100% + 40px);
margin-left: -20px;
margin-right: -20px;
}

Set the code in theme panel custom code> advance css> phones.

Unfortunately I do not quiet understand what do you want to achieve using the block 5 widget, please provide some more details and some screenshots if is possible.

Thank you!

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