1

I'm moving some old code to jQuery Mobile and have a CSS three colour button, but it seems to conflict with JQM as the design gets messed up.

I made a jsFiddle and as you can see that the button looks OK without JQM, but if you tick jQuery Mobile 1.3.1 the text is too low (offset?) and I get a strange black blob on the button.

My button background is like background: linear-gradient(to bottom, rgb(255, 255, 255) 33%, rgb(255, 98, 118) 33%, rgb(255, 98, 118) 66%, rgb(121, 178, 203) 66%);

How do I get around this?

2 Answers 2

1

The shift of the text and the black blob is the div that you put before the div.html-face

<div class="ui-input-text ui-shadow-inset ui-corner-all ui-btn-shadow ui-body-a">
                <input type="text" tabindex="-1" role="presentation" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow: hidden; position: absolute;" class="ui-input-text ui-body-a">
            </div>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! As I code in GWT and that actually is derived from ToggleButton it will take some work to figure out, but at least now I know where to look.
0

One way to solve it is to not use a GWT button, but instead use a JQM button and then add the CSS styling in a custom theme.

While JQM does not seem to allow manual line breaks in a button there is a workaround described at How do I do a manual line break in an jQuery Mobile button?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.