html - Black background for text -


i getting black background text inside div. don't know why. code , style div is.

<div class="intro_div">             <div>intro text goes here</div> </div> 

the style div is

.intro_div{   color: #fff;   font-size: xx-large;   text-align: center;   height: 500px;   vertical-align: middle;   line-height: 500px; } 

the output enter image description here

you need use background-color, not color:

.intro_div{   background-color: #fff;   color:black;   font-size: xx-large;   text-align: center;   height: 500px;   vertical-align: middle;   line-height: 500px; } 

also, try using known names in css, more readble. instead of

background-color: #fff;  

try using

background-color: white; 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -