JD.
JD.

Reputation: 15551

JQueryMobile button inline not working

I have the following :

<a href="index.html" data-role="button" data-inline="true">Button</a> 

The button is shown across the width of the page where the data-inline="true" should show a button as wide as the text in it.

I am using Chrome and the page from www.jquerymobile.com is shown correctly.

Any ideas why this is not working?

JD

Upvotes: 0

Views: 2843

Answers (2)

guero
guero

Reputation: 11

You need to wrap your links in a div that also specifies data-inline="true"

Andrew

p.s. The jQueryMobile website does not specify that you need data-inline="true" on their website however you will need to wrap the elements in a div as well as specify data-inline="true" on each element also.

Andrew (ElGueroPesado)

Upvotes: 1

funwhilelost
funwhilelost

Reputation: 2010

If the page is being served from within an MVC framework there's always the possibility that it's being modified by another part of the framework that is implicitly used.

  • First, verify that the raw HTML served from your ASP.NET server includes all the correct data-* attributes.
  • Second, inspect the DOM after jQuery Mobile has added the applicable styles. Compare these with the inspected styles of the offline version.
  • Third, double check the CSS you're including doesn't conflict with the correctly styled page.

Good luck!

Upvotes: 1

Related Questions