You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our web app will use a Bootstrap [Navbar](https://getbootstrap.com/docs/4.0/components/navbar/) component to render our main menu at the top of the page. The Navbar is responsive: it will automatically adjust its layout based on the page width.
45
50
46
51
The Navbar component is placed the beginning of the `<body>` element.
47
52
48
53
We'll add menu items for the features that we will implement in this tutorial, including:
49
54
50
-
- Layer panel for managing the layers displayed on the WorlWind globe
55
+
- Layer panel for managing the layers displayed on the WorldWind globe
51
56
- Settings panel for configuring the WorldWind globe
52
57
- Search box for place name searches and geocoding
The `<main/>` element will host main content of our web app: the globe and other content. In this tutorial,
107
+
we want the element to be the full width of the page so we apply the Bootstrap `container-fluid`
108
+
class to the element. The `container` element used in many Bootstrap templates constrains the width.
109
+
110
+
We also override Bootstrap's default padding around the element via Bootstrap's [spacing utilities](https://getbootstrap.com/docs/4.0/utilities/spacing/).
111
+
We use `p-0` which sets the padding to zero. You can experiment with other padding options.
112
+
113
+
```html
114
+
<!-- Use container-fluid for 100% width and set padding to 0 -->
115
+
<mainrole="main"class="container-fluid p-0">
97
116
```
98
117
118
+
To make layout easier, we add some padding to the top of the `body` element so that children do not slide
119
+
under the Navbar.
120
+
121
+
```css
122
+
body {
123
+
/*Account for the height of the navbar component*/
124
+
padding-top: 3.5rem;
125
+
}
126
+
```
127
+
128
+
### Cards: panels for layers and settings
129
+
130
+
We'll use Bootstrap [Card](https://getbootstrap.com/docs/4.0/components/card/) components to host the WorldWind layers and settings content.
0 commit comments