slider labels not displayed

Hi

I have this jquery mobile code. But I don't understand why the labels "Question1", "Question2" and "Question3" are not displayed:

<!DOCTYPE html>
<html>
<head>
  <!-- Include meta tag to ensure proper rendering and touch zooming -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Include jQuery Mobile stylesheets -->
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
  <!-- Include the jQuery library -->
  <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
  <!-- Include the jQuery Mobile library -->
  <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>

<div data-role="page">
<div data-role="header" data-theme="b">
<h1>title</h1>
</div>
<div data-role="content">
<fieldset>
<form action="proslider.asp" name="form1" method="post" data-ajax="false" class="ui-body ui-body-a ui-corner-all">
<fieldset data-role="controlgroup">
<legend>Sliders</legend>
<label for="q5_1" class="ui-hidden-accessible">Question1</label>
<table>
<tr>
<td>High</td>
<td style="min-width:400px;max-width:800px;"><input type="range" name="q5_1" id="q5_1" min="0" max="100" value="50" data-show-value="true" style="display:none;"></td>
<td>Low</td>
</tr>
</table>
<label for="q5_2" class="ui-hidden-accessible">Question2</label>
<table>
<tr>
<td>Big</td>
<td style="min-width:400px;max-width:800px;"><input type="range" name="q5_2" id="q5_2" min="0" max="100" value="20" data-show-value="true" style="display:none;"></td>
<td>Small</td>
</tr>
</table>
<label for="q5_3" class="ui-accessible">
Question3
</label>
<table>
<tr>
<td>A lot</td>
<td style="min-width:400px;max-width:800px;"><input type="range" name="q5_3" id="q5_3" min="0" max="200" value="70" data-show-value="true" style="display:none;"></td>
<td>A little</td>
</tr>
</table>
<br><br>
<input type="submit" data-theme="b" value="submit" id="submitButton" name="continue">
</form>
</fieldset>
</div>
</div>

</body>
</html>

Open in new window

arielbfAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Marco GasiFreelancerCommented:
Can you post a link to the live page?
0
arielbfAuthor Commented:
Just do copy+paste on the editors of w3scools or something like that.
0
Marco GasiFreelancerCommented:
Don't ask me why, because inspecting css I didn't be able to understand what rule prevented labels from display correctly... Anyway, you find below a working markup.

First, I removed the class 'ui-hidden-accessible' from labels, but this was  not enough
Second I putted them each within its sibling table element creating a new row and a column with colspan=2

Hope this works for you :-)

<!DOCTYPE html>
<html>
<head>
  <!-- Include meta tag to ensure proper rendering and touch zooming -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Include jQuery Mobile stylesheets -->
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
  <!-- Include the jQuery library -->
  <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
  <!-- Include the jQuery Mobile library -->
  <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>

<div data-role="page">
<div data-role="header" data-theme="b">
<h1>title</h1>
</div>
<div data-role="content">
<fieldset>
<form action="proslider.asp" name="form1" method="post" data-ajax="false" class="ui-body ui-body-a ui-corner-all">
<fieldset data-role="controlgroup">
<legend>Sliders</legend>
<table>
<tr>
<td colspan="2">
<label for="q5_1">Question1</label>
</td>
</tr>
<tr>
<td>High</td>
<td style="min-width:400px;max-width:800px;"><input type="range" name="q5_1" id="q5_1" min="0" max="100" value="50" data-show-value="true" style="display:none;"></td>
<td>Low</td>
</tr>
</table>
<table>
<tr>
<td colspan="2">
<label for="q5_1">Question2</label>
</td>
</tr>
<tr>
<td>Big</td>
<td style="min-width:400px;max-width:800px;"><input type="range" name="q5_2" id="q5_2" min="0" max="100" value="20" data-show-value="true" style="display:none;"></td>
<td>Small</td>
</tr>
</table>
<table>
<tr>
<td colspan="2">
<label for="q5_1">Question3</label>
</td>
</tr>
<tr>
<td>A lot</td>
<td style="min-width:400px;max-width:800px;"><input type="range" name="q5_3" id="q5_3" min="0" max="200" value="70" data-show-value="true" style="display:none;"></td>
<td>A little</td>
</tr>
</table>
<br><br>
<input type="submit" data-theme="b" value="submit" id="submitButton" name="continue">
</form>
</fieldset>
</div>
</div>
</body>
</html>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Marco GasiFreelancerCommented:
Oh, you can see it here: http://jsfiddle.net/2L0dmrL8/
0
arielbfAuthor Commented:
The web works in mysterious ways...
;-)

Thanks!
0
Marco GasiFreelancerCommented:
Lol... Not only the web. Thanks for points and good luck with your project.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.