Created
February 5, 2015 20:49
-
-
Save tristen/535fd41f2aefb8210f2d to your computer and use it in GitHub Desktop.
fixed header + full screen map
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>A simple map</title> | |
| <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
| <script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.js'></script> | |
| <link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.css' rel='stylesheet' /> | |
| <style> | |
| body { margin:0; padding:0; } | |
| header { | |
| background-color:#1b1b1b; | |
| padding:0 10px; | |
| color:#fff; | |
| font-weight:bold; | |
| font-family:'Helvetica Neue'; | |
| position:absolute; | |
| z-index:10; | |
| width:100%; | |
| min-height:60px; | |
| line-height:60px; | |
| -webkit-box-sizing:border-box; | |
| -moz-box-sizing:border-box; | |
| box-sizing:border-box; | |
| } | |
| #map { position:absolute; top:60px; bottom:0; width:100%; } | |
| </style> | |
| </head> | |
| <body> | |
| <header>A header</header> | |
| <div id='map'></div> | |
| <script> | |
| L.mapbox.accessToken = 'pk.eyJ1IjoidHJpc3RlbiIsImEiOiJiUzBYOEJzIn0.VyXs9qNWgTfABLzSI3YcrQ'; | |
| var map = L.mapbox.map('map', 'examples.map-i86nkdio') | |
| .setView([40, -74.50], 9); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment