I am using the responsive grids to split pages depending on the size of the screen.
This is splitting fine, but I want sections to take the full screen width with smaller screens, but not with bigger screen (see JPG attached).
Here is the code I am using, it seems that the "padding" attributes are not seen, while the "width" attribute is seen. Is this normal ?
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="iso-8859-1"/>
<link rel="stylesheet" href="css/jquery.mobile-1.3.0-beta.1.css" />
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.3.0-rc.1.min.js"></script>
<style>
/* stack all grids below 40em (640px) */
@media all and (max-width: 35em) {
.ui-grid-a,
.my-breakpoint .ui-block-a,
.my-breakpoint .ui-block-b,
.my-breakpoint .ui-block-c,
.my-breakpoint .ui-block-d {
width: 100%;
float:none;
padding-left: 0%;
padding-right: 0%;
}
}
</style>
</head>
<body>
<div data-role="page" id="home" data-title="home" data-needs-auth="true">
<header data-role="header" data-theme="i">
<nav id="header_home"><a href="#" data-role="button" data-theme="b" data-corners="false" data-theme="p" data-mini="true">button</a></nav>
</header>
<section data-role="content" data-theme="b">
<div class="ui-grid-a my-breakpoint">
<div class="ui-block-b" style="padding-left: 3%; padding-right: 3%; line-height: 1.9em;">
<ul data-role="listview" data-theme="b" data-dividertheme="b" data-inset="true">
<li data-icon="false" style="text-align: center;">info 1</li>
</ul>
</div>
<div class="ui-block-b" style="padding-left: 3%; padding-right: 3%; line-height: 1.9em;">
<!-- Additional information -->
<ul data-role="listview" data-theme="b" data-dividertheme="b" data-inset="true">
<li data-icon="false" style="text-align: center;">info 2</li>
</ul>
</div>
</div>
<div class="ui-grid-a my-breakpoint">
<div class="ui-block-b">
<ul data-role="listview" data-theme="b" data-dividertheme="b" data-inset="true">
<li data-icon="false" style="text-align: center;">info 3</li>
</ul>
</div>
<div class="ui-block-b">
<ul data-role="listview" data-theme="b" data-dividertheme="b" data-inset="true">
<li data-icon="false" style="text-align: center;">info 4</li>
</ul>
</div>
</div>
</section>
</div>
</body>
</html>
Why is the button on top of the page taking the whole width while everything inside the page div are smaller ?