954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

font color 2

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 information from OCK&Associates</li>
          </div></div>

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;
	}

Get In Touch With Us

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

davy_yg
Posting Whiz
377 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

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

teedoff
Posting Pro
599 posts since Jul 2010
Reputation Points: 21
Solved Threads: 60
 

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.

davy_yg
Posting Whiz
377 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

It still doesn't work

#content #boxcontainer h3{ 
	font face: "Arial" font-color:"red"; size: 14px;
         }
davy_yg
Posting Whiz
377 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

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.

teedoff
Posting Pro
599 posts since Jul 2010
Reputation Points: 21
Solved Threads: 60
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You