下記のコードのdtタグに対し、border-leftを指定したのですが、適応されません。
下記は自分が作成しましたコードになります。
HTML
1<!DOCTYPE html> 2<html lang="ja"> 3<head> 4 <meta charset="UTF-8"> 5 <title>課題</title> 6 <link rel="stylesheet" href="practice_selector.css"> 7</head> 8<body> 9 <article class="wrapper"> 10 <h1 class="contents_top">私のおすすめレストラン</h1> 11 <p>私が今までに利用したレストランに中からおすすめのお店を紹介します。</p> 12 <section class="resturant_list"> 13 <div class="contents_main"> 14 <h1 class="contents_titile">おすすめのレストラン一覧</h1> 15 <ul type="square"> 16 <li>レストランA</li> 17 <li>レストランB</li> 18 <li>レストランC</li> 19 <li>レストランD</li> 20 <li>レストランE</li> 21 </ul> 22 <div class="comment"> 23 <p><span class="background-color-pink">ピンク</span>の背景色のレストランは女性に特におすすめです。</p> 24 <p><span class="color-red">赤</span>の文字色はファミリー向けのお店です</p> 25 </div> 26 </div> 27 </section> 28 <section class="cooking_list"> 29 <div class="contents_main"> 30 <h1 class="contents_titile">各レストランのおすすめメニュー</h1> 31 <dl> 32 <dt>レストランA</dt> 33 <dd>フレンチトースト</dd> 34 <dt>レストランB<span class="star">★</span></dt> 35 <dd>パンケーキ</dd> 36 <dt>レストランC</dt> 37 <dd>シーザーサラダ</dd> 38 <dt>レストランD<span class="star">★</span></dt> 39 <dd>ハンバーグ</dd> 40 <dt>レストランE</dt> 41 <dd>ミートスパゲッティ</dd> 42 </dl> 43 <div class="comment"> 44 <p><span class="star">★</span>は雑誌で紹介されたお店です</p> 45 </div> 46 </div> 47 </section> 48 </article> 49</body> 50 51</html>
css
1.wrapper{ 2 background-color:#B3B3B3; 3 width:500px; 4 height:100%; 5 margin:0 auto; 6 padding:50px; 7 8} 9.resturant_list{ 10 width:468px; 11 border:solid 1px #FF0000; 12 background-color:#FFFFFF; 13 padding:15px; 14 padding-left:30px; 15 16 margin-left:0; 17} 18p{ 19 font-size:16px; 20} 21li{ 22 margin-bottom:5px; 23} 24li:nth-child(2){ 25 color:#FF0000; 26 background-color:#FAAFCC; 27} 28li:nth-child(3){ 29 background-color:#FAAFCC; 30} 31li:last-child{ 32 color:#FF0000;; 33} 34.comment{ 35 background-color:#E6E6E6; 36} 37.comment p{ 38 margin:0; 39 40} 41 42.contents_main{ 43 width:460px; 44} 45.cooking_list{ 46 border:solid 1px #0000FF; 47 padding:15px; 48 padding-left:30px; 49 background-color:#FFFFFF; 50 margin-top:30px; 51 width:468px; 52} 53.contents_top{ 54 font-size:30px; 55} 56.contents_titile{ 57 font-size:25px; 58} 59.star{ 60 color:#FFFF00; 61} 62dt{ 63 border-left:solid 10px #FFFF00; 64 65}
使用したブラウザはgooglechromeで、開発環境はcloud9を使用いたしました。
以下は、実行結果の画面です。
どなたか教えてくださる方いらっしゃいましたら、ご回答いただけましたら幸いです...
すみません。追記です。
dl要素だけにCSSが適用されていないと思っていたのですが、CSSをすべて削除したのですが、実行結果が変わらないままでした...
回答1件
あなたの回答
tips
プレビュー