--- id: 587d7791367417b2b2512ab4 title: width プロパティで要素の幅を調整する challengeType: 0 videoUrl: 'https://scrimba.com/c/cvVLPtN' forumTopicId: 301039 dashedName: adjust-the-width-of-an-element-using-the-width-property --- # --description-- CSS では `width` プロパティを使用して要素の幅を指定できます。 値は相対単位 (`em` など) や、絶対単位 (`px` など)、または親要素に対するパーセンテージなどで指定することができます。 下記は画像の幅を 220px に変更する例です: ```css img { width: 220px; } ``` # --instructions-- カード全体に `width` プロパティを追加して、値を絶対単位 245px に設定してください。 要素の選択には `fullCard` クラスを使用してください。 # --hints-- `fullCard` クラスセレクターを使用して、カードの `width` プロパティを 245 ピクセルに変更する必要があります。 ```js const fullCard = code.match(/\.fullCard\s*{[\s\S]+?[^}]}/g); assert( fullCard && /width\s*:\s*245px\s*(;|})/gi.test(fullCard[0]) && $('.fullCard').css('maxWidth') === 'none' ); ``` # --seed-- ## --seed-contents-- ```html

Google

Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.

``` # --solutions-- ```html

Google

Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.

```