index.html

<div id="side">
<div id="boxcontainer">
<div id="side-info">
	<h3>Get In Touch With Us</h3>
	<ul>
	<li><img src="images/pic2.png" ALT="picture1" ALIGN=LEFT />Request more <br />information from <br />OCK&Associates</li>
          <br></div></div><br>

style.css

#content #boxcontainer {
	width:240px;
	padding: 10px;
	border:0px solid #000;
	background-color:#CCCCCC;			
	}
			
#content #boxcontainer h3{ 
	font face: "Arial" color: red size: 14px;
	}

<h3>Get In Touch With Us</h3>

Suppose to be in red color, but in actual I still see it black. Why is it ? How to turn it to red ?

Recommended Answers

All 4 Replies

Because you're missing a semi colon after "red"...."color: red;"

You should run your html and css through the w3 validators and it will point out typoes like this as well as invalid code.

CSS Validator

HTML/XHTML Validator

It doesn't point out the solution only the errors.

for example:

Target: http://color:#ff0000
I/O Error: color

How to use the validator ? Well, I need the altertive solution if it is error.

It still doesn't work

#content #boxcontainer h3{ 
	font face: "Arial" font-color:"red"; size: 14px;
         }

Then you're not targeting the correct child element.

h3{ 
	color: red;
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	}

That works perfectly for me on an h3 tag.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.