How to avoid .ui-btn-left and .ui-btn-right being assigned to links in header? #7209

frankie-loves-jesus opened this Issue Mar 5, 2014 · 5 comments


None yet
3 participants

How to avoid .ui-btn-left and .ui-btn-right being assigned to links in header?

These classes will position my first link to the left and my second to the right which is not what my designer had in mind when she designed my layout.

Trying to avoid manually overriding these classes or putting my links in a wrapper to duck away from the class assignment.

gtsop commented Mar 5, 2014

If you don't mind writting some more css, you can remove the data-role="header" and assign the generated classes manually:

Thank you, brilliant suggestion! But kinda messy. My coworkers would kill me if I did something like that.

@ugomobi @gabrielschulhof @gseguin @arschmitz -- maybe we could avoid jQuery Mobile hijacking and styling elements (despite using the structure only CSS) with something like data-structure-only="true"?

@jaspermdegroot jaspermdegroot modified the milestone: 1.5.0 Mar 10, 2014


jaspermdegroot commented Mar 10, 2014


We are going to remove this feature in 1.5 (1.4.0 changelog) since it's better for performance if you add those classes in the markup yourself, and it gives the flexibility that you are looking for.
At the moment you can also prevent it by wrapping the links in a div:
I am going to create a ticket for removing the applicable code and close this ticket as duplicate.


jaspermdegroot commented Mar 10, 2014

Closing as duplicate of #7230

Excellent news @ugomobi. We are surely moving towards perfection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment