質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.49%
HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

CSS

CSSはXMLやHTMLで表現した色・レイアウト・フォントなどの要素を指示する仕様の1つです。

Q&A

解決済

1回答

16768閲覧

background-color が変わらない。

TomofumiKimura

総合スコア65

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

CSS

CSSはXMLやHTMLで表現した色・レイアウト・フォントなどの要素を指示する仕様の1つです。

0グッド

0クリップ

投稿2017/05/16 01:16

ul list のbackground-color が変わりません。どうしてなのでしょうか?

html

1<!-- Assignment 18 % COMP112 Tomofumi Kimura index page--> 2<!DOCTYPE html> 3<html lang="en"> 4 <head> 5 <!-- kimto341 child care--> 6 <meta charset = "UTF-8"> 7 <link rel="stylesheet" type = "text/css" href="style.css"> 8 <title>Child Care HomePage</title> 9 </head> 10 <body> 11 <!-- Main Heading--> 12 <div id = "header"> 13 <h1>Welcome to Mama Bear Child Care</h1> 14 </div> 15 <!-- Navigation Area --> 16 <div id = "nav"> 17 <ul> 18 <li><a class="active" href="index.html">Home</a></li> 19 <li><a href = "philosophy.html">Our Philosophy</a></li> 20 <li class = "dropdown"><a href="javascript:void(0)" class = "dropbtn">Our Centre</a> 21 <div class = "dropdown-content"> 22 <a href="accelerated_programme.html">Mama Bear Accelerated Programme</a> 23 <a href="environment.html">Our Environment</a> 24 <a href="goals.html">Our Goals</a> 25 </div> 26 </li> 27 28 29 <li><a href="childs_day.html">The Childs Day</a></li> 30 <li><a href="settling.html">Settling in</a></li> 31 <li><a href = "staff.html">Our Staff</a></li> 32 33 </ul> 34 </div> 35 36 <!-- Contact Area --> 37 <div id = "contacts"> 38 <h3 id="contact_us">Contact Us</h3> 39 <h4>If you have any questions about the Mama Bear please contact us at:</h4> 40 <ul> 41 <li>enquiries@mamaBear.co.nz</li> 42 <li>123 Salmon Lake Lane</li> 43 <li>Big Bear City</li> 44 </ul> 45 </div> 46 <!-- Main Area --> 47 <div class="content"> 48 <h2>Our Philosophy</h2> 49 50 <ul id = "philo_list"> 51 <li>We believe in positive respectful partnerships between <br>children, families, caregivers and teachers where we value our community's diversity.</li> 52 <li>We aim to support children's learning through a stimulating prepared environment that nurtures and develops dispositions for learning and provides opportunities for success, challenges, individual interests, and freedom of choice.</li> 53 54 <li>Our community fosters contextual, collaborative and reciprocal learning, where teachers are facilitators, carers and friends of the children.</li> 55 <li>We empower children to be independent, competent, confident, compassionate and responsible human beings, and most importantly to have fun in the process.</li> 56 57 </ul> 58 59 </div> 60 <!-- Footer area --> 61 <div id = "footer"> 62 <footer>This website was created for a University project. The content is largely fictional and no services are actually being offered.</footer> 63 64 </div> 65 66 </body> 67</html>

css

1/* COMP112 Assignment 18% tkimura Tomofumi Kimura stylesheet*/ 2 3body{ 4 background-color:rgb(224, 200, 202); 5 margin:0px; 6 7} 8 9/* main heading*/ 10#header h1{ 11 background-color:red; 12 text-align: center; 13 width:100%; 14 margin:0px; 15 padding:20px; 16 position:fixed; 17 top:0; 18 left:0; 19 right:0; 20} 21/* Navigation whole area */ 22#nav{ 23 background-color:rgb(87, 209, 204); 24 position:fixed; 25 top:75px; 26 left:0; 27 right:0; 28 width:100%; 29 margin:0px; 30} 31/* Navigation whole ul ara */ 32#nav ul{ 33 max-width:100%; 34 list-style-type:none; 35 padding:0; 36 margin-top:0px; 37 margin-left:150px; 38 margin-right:auto; 39 margin-bottom:auto; 40 overflow:hidden; 41 background-color:inherit; 42} 43/* Navigation list area*/ 44#nav li{ 45 float:left; 46 47 48} 49 50/* Navigation list link, DropDown menu*/ 51#nav li a, .dropbtn{ 52 display:block; 53 color:inherit; 54 text-align:center; 55 padding:14px 30px 10px 30px; 56 text-decoration: none; 57 58 59} 60/* when user move the pointer to the place */ 61#nav li a:hover, .dropdown:hover .dropbtn{ 62 background-color:yellow; 63} 64 65#nav li.dropdown{ 66 display:block; 67} 68/* drop down area*/ 69.dropdown-content{ 70 display:none; 71 position:absolute; 72 background-color:#f9f9f9; 73 min-width:100px; 74 box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2); 75 z-index: 1; 76} 77/* drop down list element*/ 78.dropdown-content a{ 79 color:black; 80 padding:12px 16px; 81 text-decoration: none; 82 display:block; 83 text-align:left; 84} 85/* when mouse is over the drop down list element */ 86.dropdown-content a:hover{ 87 background-color:#f1f1f1; 88} 89 90.dropdown:hover .dropdown-content{ 91 display:inline; 92} 93 94/* Contact Us Area*/ 95 96#contacts{ 97 position:fixed; 98 right:10px; 99 float:right; 100 width:220px; 101 margin-left:20px; 102 border-radius:25px; 103 border:2px solid #73AD21; 104 background-color:yellow; 105 padding:10px; 106} 107#contact_us{ 108 color:red; 109} 110 111/* Main Area*/ 112.content{ 113 margin-top:170px; 114 margin-right:20px; 115 width:1100px; 116 height:auto; 117 118} 119 120 121/* h2 Mama Bear CHild Care heading */ 122.content h2{ 123 text-align: center; 124 color:rgb(0, 102,255); 125} 126.content h3{ 127 text-align: center; 128 129} 130.content h4{ 131 text-align:center; 132 133} 134.content span{ 135 color:red; 136} 137#attention{ 138 text-align:center; 139 background-color:rgb(153,204,255); 140 border:dotted 2px ; 141 padding-left:-10px; 142 border-radius: 40px; 143} 144 145/* Education Services UList*/ 146.content ul{ 147 margin:auto; 148 border-radius: 50px; 149 border:2px solid #73AD21; 150 padding:40px; 151 padding-top:10px; 152 width:400px; 153 height:140px; 154 background-color:rgb(153,204,255); 155 list-style-image: url('../Images/list_image/icn_12.gif'); 156} 157.content li{ 158 padding:20px; 159} 160/* Philosophy page List */ 161#philo_list{ 162 border-radius:50%; 163 background-color:white; 164 width:600px; 165 height:400px; 166} 167 168/* Footer area*/ 169 170#footer{ 171 margin-top:30px; 172 position:relative; 173 background-color:rgb(87, 209, 204); 174 color:inherit; 175 padding:30px; 176 width:100%; 177 height:10px; 178}

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

yambejp

2017/05/16 01:37

具体的にどの箇所が想定と違っているのでしょうか?
TomofumiKimura

2017/05/16 01:48

あ、すいません。philo_list の中の背景がwhite になってるはずなのですが。青になってしまいます。
Zuishin

2017/05/16 02:02

Chrome で見てみましたが、楕円の中の話ですよね? 白いですよ。試しに background-color:white; をコメントアウトしたら青くなりました。
TomofumiKimura

2017/05/16 02:05

あれ、おかしいですね、なぜか自分のは青のママなんですけど
guest

回答1

0

ベストアンサー

違う html を開いているか、書き換える前のキャッシュを見ているのではないですか?
まず URL を見て正しいかどうか確かめてください。
次に更新して変わらないかどうか確かめてください。

Chrome でしたら、F12 を押すとデベロッパーツールが開きます。
そこで Elements タブを選択してその中から該当タグを選択し、Styles を見てください。
どうなっていますか?

投稿2017/05/16 02:11

Zuishin

総合スコア28660

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

TomofumiKimura

2017/05/16 02:31

なぜか、background-color:white; を消してまたそこにbackground-color:white; を打ったら白になりました。今度からはZuishinさんの手順をお手本に間違いを直していこうと思います。ありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.49%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問