Not fitting with "Fit to Content in HTML" in Repeater when DP state change or show/hide from Action

Axure can definitely do what you describe. Take a look at this thread where I posted a sample repeater which changes the style of menu items, along with the height of the item (it is a vertical menu.) You can adapt this approach for your horizontal menu.

Using a Repeater for Multi-level Accordion Navigation?:

So, you could create a dynamic panel for everything in your repeater cell, or just the background or whatever needs to be different. Copy the state twice to create three states, and name them “Normal, First, Last” Then edit the styles, sizes etc in each state to get them how you want them looking. Name each widget according to the state, so you can refer to it later, e.g., “labelNormal”, “labelFirst”, “labelLast” and keep in mind you’ll now have three of everything to deal with. So, your OnItemLoad code will need to set the text on three widgets (in this example), not just one. Now, if you dp is set to “Resize to fit” and your repeater is set to “Fit Content to HTML” then it should work correctly.

Furthermore, you can actually dynamically change the style of a widget, up to three styles. If you need more than two or three styles, use a dynamic panel and change states as above.

Typically, there are only two styles, unselected (normal, default) and selected. You can edit these styles from the Properties tab, below the Interactions code. To change it dynamically, just use the “set selected of MyWidget to true” (or false, or toggle). When the selected state changes it triggers events from which you can do things: OnSelectedChange, OnSelected and OnUnselected.

However, you can also create a style using the Disabled property to create a 3-state widget. Just remember that when a widget is disabled, its code won’t run. So, if you need to do something when this third state happens, or you need more styles you need to use a dynamic panel.

In your case, with a repeater and different sizes for your styles/states, a dynamic panel will work best, and when done right, will resize your repeater dynamically.