83 lines
1.5 KiB
Markdown
83 lines
1.5 KiB
Markdown
---
|
|
id: 5d822fd413a79914d39e98d2
|
|
title: Step 10
|
|
challengeType: 0
|
|
dashedName: step-10
|
|
---
|
|
|
|
# --description--
|
|
|
|
Nest a `div` with a class of `bb1` in the background buildings container. Open your `styles.css` file, and give `.bb1` a `width` of `10%` and `height` of `70%`. "bb" stands for "background building", this will be your first building.
|
|
|
|
# --hints--
|
|
|
|
You should create a new `div` element.
|
|
|
|
```js
|
|
assert.equal(document.querySelectorAll('div').length, 2);
|
|
```
|
|
|
|
You should give the new `div` a class of `bb1`.
|
|
|
|
```js
|
|
assert.exists(document.querySelector('div.bb1'));
|
|
```
|
|
|
|
You should use a `.bb1` class selector to style the element.
|
|
|
|
```js
|
|
assert.exists(new __helpers.CSSHelp(document).getStyle('.bb1'));
|
|
```
|
|
|
|
You should give the `.bb1` element a `width` of `10%`.
|
|
|
|
```js
|
|
assert.equal(new __helpers.CSSHelp(document).getStyle('.bb1')?.width, '10%');
|
|
```
|
|
|
|
You should give the `.bb1` element a `height` of `70%`.
|
|
|
|
```js
|
|
assert.equal(new __helpers.CSSHelp(document).getStyle('.bb1')?.height, '70%');
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```html
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>City Skyline</title>
|
|
<link href="styles.css" rel="stylesheet" />
|
|
</head>
|
|
|
|
<body>
|
|
--fcc-editable-region--
|
|
<div class="background-buildings"></div>
|
|
--fcc-editable-region--
|
|
</body>
|
|
</html>
|
|
```
|
|
|
|
```css
|
|
* {
|
|
border: 1px solid black;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
height: 100vh;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.background-buildings {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
```
|
|
|