# Replacement for SM\_ALIGMENT

**URL:** <https://forum.servoy.com/t/replacement-for-sm-aligment/21341>\
**Category:** Questions\
**Created:** [November 28, 2024, 8:54am UTC](https://forum.servoy.com/t/replacement-for-sm-aligment/21341 "2024-11-28T08:54:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vik.lamp.vl](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/vik.lamp.vl/32/4447_2.png) [@vik.lamp.vl](https://forum.servoy.com/u/vik.lamp.vl)\
**Post date:** [November 28, 2024, 8:54am UTC](https://forum.servoy.com/t/replacement-for-sm-aligment/21341/1 "2024-11-28T08:54:04Z")

</div>

Howdy,

do we have a replacement for SM\_ALIGMENT, in particular in plugins.windows.createPopupMenu()?  
I cant use the css-styleclass because my “header/title” menu has the same class as the “clickable” menus (.dropdown-menu)

Its just a tiny cosmetic thing but maybe some of you have a workaround for it.

Ty and have a nice day

-Vik

[attachment=0]svyPopUpMenu.png[/attachment]

 ![svyPopUpMenu.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/4/477ad19abbf942067f4654748a7988a0617c6d9e.png)

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [November 28, 2024, 10:18am UTC](https://forum.servoy.com/t/replacement-for-sm-aligment/21341/2 "2024-11-28T10:18:18Z")

</div>

> vik.lamp.vl:  
> I cant use the css-styleclass because my “header/title” menu has the same class as the “clickable” menus (.dropdown-menu)

Hi Vik,

actually you can when adding the item in html, something like this:

```auto
addMenuItem('<span class="my-item-class">Item 1</span>')

```

Then you can create a style class like this:

```auto
.drowdown-item .my-item-class {
 color: red;
}

```

The above shows the item in red, but you can replace that with the alignment/padding you need.

Hope this helps

---

<div class="post-metadata">

**Author:** ![vik.lamp.vl](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/vik.lamp.vl/32/4447_2.png) [@vik.lamp.vl](https://forum.servoy.com/u/vik.lamp.vl)\
**Post date:** [November 28, 2024, 10:36am UTC](https://forum.servoy.com/t/replacement-for-sm-aligment/21341/3 "2024-11-28T10:36:23Z")

</div>

Hi Marc,

oh yeah thanks. That makes sense. I didnt even think about giving the menus a css style class.  
I used and **but wasnt thinking further ![:D]( "Very Happy")**

 

Thanks!
