Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Remove Default Padding for sap.m.ObjectHeader Without CSS

Tags:

sapui5

I'm trying to use ObjectHeader but it has standard padding given by .sapMOH style class. I want to remove that padding.

I tried:

  • <ObjectHeader class="sapUiNoContentPadding" binding="" title="text">
  • class="sapUiSizeCompact"
  • .removeStyleClass("sapMOH");

But none of the above seems to work.

How to achieve it without custom CSS?

like image 852
adirocks27 Avatar asked Mar 20 '26 20:03

adirocks27


1 Answers

If you do not want to add a CSS file, you could try to directly add the style to the HTML description of the element. In this case that would be along the lines of (depending on whether you use HTML/XML/JS views):

<ObjectHeader style="padding:0px !important" class="sapUiNoContentPadding" binding="" title="text">
like image 124
Daniël Camps Avatar answered Mar 23 '26 18:03

Daniël Camps



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!