57
Views
2
Comments
Webblock creates a div and display flex issues

I recently stumbled upon an issue while developing a new layout in React, which heavily employs the display flex property. The issue arises when adding a web block (wb) with multiple elements inside to a div intended to be within a flex display. Despite expecting the content inside the web block to adhere to the flex layout, it doesn't, as the web block itself generates a div with the class "OSBlockWidget," which disrupts the flex layout.

My question is whether it's feasible for this OSBlockWidget to inherit properties from its parent div or if there's a way to remove it entirely. Is this a common issue, and does anyone have a workaround? 

Thank you

2022-05-19 14-01-44
Varada Rajan

Hi Carlos, 


It should be feasible, please try overriding the OSBlockWidget CSS with-in layout/App/Theme CSS.
Please post a oml sample and specify where we got stumbled upon, would try to edit and re-post.

Regards,
Varada Rajan

2018-10-17 18-00-19
Carlos Gonçalves

The best way i found is overwrite the Div with "display: contents"  for someone that has this issue in the future.

"Makes the container disappear, making the child elements children of the element the next level up in the DOM "

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.