--- id: bad87fee1348bd8acde08812 title: Bootstrap でテキストを中央寄せする challengeType: 0 forumTopicId: 16771 dashedName: center-text-with-bootstrap --- # --description-- Bootstrap を使用しているので、見出し要素を中央に配置して、見た目を良くすることができます。 必要なのは、クラス `text-center` を `h2` 要素に追加することだけです。 同じ要素に複数のクラスを追加するには、次のようにそれぞれのクラスをスペースで区切ります。 ```html

your text

``` # --hints-- `h2` 要素に `text-center` を適用して中央寄せにします。 ```js assert($('h2').hasClass('text-center')); ``` `h2` 要素にもクラス `red-text` が必要です。 ```js assert($('h2').hasClass('red-text')); ``` # --seed-- ## --seed-contents-- ```html

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back. Three kittens running towards the camera.

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
``` # --solutions-- ```html

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back. Three kittens running towards the camera.

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```