Just trying to get into JQueryMobile. I want to do something simple like putting a table in the centre of a page but it seems to put the table at the top next to the header with the footer below, so only 30% of my page is being used. I tried setting height=100% for the html, body, and table elements but this did not help. I want the table to use all the available space between the header and the footer.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" />
<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js">
</script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Page Title</h1>
</div><!-- /header -->
<div data-role="content">
<table border=1px>
</tr>
<tr >
<td>This is centered</td>
</tr>
</table>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /header -->
</div><!-- /page -->
</body>
</html>
JD
You don’t need JQuery or Javascript, just Css 🙂
Preview