Style content background

Description

The following code shows how to style content background.

Example


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
html, body {<!--from  w w w  .j a v a  2 s.  com-->
  height: 100%;
}

#map-page {
  height: 100%;
}

#map-page .ui-header {
  height: 40px;
}

#map-page .ui-content {
  position: absolute;
  top: 40px;
  right: 0;
  bottom: 30px;
  left: 0;
}

#map-page .ui-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
}
</style>
</head>
<body>
  <link rel="stylesheet"
    href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
  <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
  <script
    src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
  <div data-role="page" id="map-page">
    <div data-role="header">
      <h1>Header</h1>
    </div>
    <div data-role="content" style="background-color: gold;">
      <p>content</p>
    </div>
    <div data-role="footer">
      <p>Footer</p>
    </div>
  </div>
</body>
</html>

Click to view the demo





















Home »
  jQuery Mobile »
    Example »




Button
Button Event
Button Icon
Button Text
Checkbox
Collapsible
Date
Dialog
Event
Footer
Form
Header
Icon
Input
Layout
Listview
Listview Divider
Listview Item
Loader
mobile_settings
Navbar
Page
Page Event
Popup
Radio
Select
Slider
Switch
Textarea
Theme