Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
CSS
#body_left h1{
	font:normal 64px/67px Regular, "Century Gothic" ;
	color:#245E06;
        text-align:left;
	background-color:inherit;
}


What is wrong with my this above code?? When ever i'm trying to change it from..
CSS
#body_left h1{
	font:normal 64px/67px Georgia, "Times New Roman", Times, serif;
	color:#245E06;
	background-color:inherit;


it is not showing that h1 tag in my asp.net page. i was implementing CSS in my asp.net page.
Posted

1 solution

Makzrider wrote
it is not showing that h1 tag in my asp.net page
This concern has nothing to do with CSS and fonts you mentioned in your question title. The tag can be shown only if you write it in HTML:
HTML
<h1 id="body_left">Some Top-Level Header Text</h1>

Besides, this is a really bad idea (in most cases), to bind the header styles with IDs as you do it. Remember, all values of all id attributes should be unique on the page (and HTML rendering and behavior, if you violate this rule, can be unpredictable). Do you really want to have only one unique style to be applied only to one unique element?

For headers, it's much better to use no selective style identification at all:
CSS
h1 {/* ... */}
In worst case, use classes (via the element attribute class="..."):
CSS
h1.Left {/* ... */}
.left {/* ... */}


Finally, you should remember that some font families can be incompatible with some systems. At the same time, it's possible to embed a fully custom font in your CSS. Please see:
http://www.paulirish.com/2009/bulletproof-font-face-implementation-syntax/[^].

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900