Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

font-size not working in css

Status
Not open for further replies.

xlav

Technical User
Oct 23, 2003
223
JM
font-size is not working in the following code;

<html>
<head><title>STYLE SHEETS</title>
<style type = "text/css">
<!--
p{font-size: 180%}

-->
</style>
</head>
<body>
<p>style sheets are stylish</p>
</body>
</html>

Thanks for your help

-x
 
Works for me. What browser are you using?

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
IE 6.0, and editor is notepad. The problem is I don't see a change in the size of the font when I change font-size value.

-x
 

It works fine for me in IE6, too. What are you changing the font size to from 180%? If I change it to 200% and 10%, I see the size go up and down respectively.

Dan
 
IE 5.5 SP2, IE 6.0 SP1 - works fine...
 
Changed to 200%, also tried 18pt, larger, 1.2em but nothing happens. Changing other attributes like color and font-family work. I will have to try validating the code to find the error.

-x
 
Try changing your CSS to this:

Code:
<style type="text/css">
p {
   font-size: 180%;
   font-family: verdana, arial, helvetica, sans-serif;
} 
</style>

I'm just wondering if your "default" font was something that didn't support scaling very well.

Hope this helps,
Dan
 
Could be a caching thing? I find at times IE6 insists on displaying cached pages even if you have changed page. This seems to be random behaviour though, doesn't always happen.
 
Went to Accessibility option and found - 'ignore font sizes specified on web pages'- ticked. Unticked it and the font sizes now change. However on IE the texts are now not as bright and they are smaller. I now remember that a site recommended this change to make web text larger.

Thanks for the solution.
-x
 
there is a whole set of tricks to make your font size appear normal yet scale correctly, as some IE and Netscape products choke and/or misinterprit font sizes.

The following code sets the body font size to normal for ALL browsers in a way that validates. (use ALL the lines)

Code:
body, td, th, p {
	font-family: verdana, helvetica, geneva, sans-serif;
	font-size: 12px;
}
/*/*/a{}
body,
body td,
body th,
body p {
  font-size: x-small;
  voice-family: "\"}\"";
  voice-family: inherit;
  font-size: small;
}
html>body,
html>body td,
html>body th
html>body p {
  font-size: small;
}  
/* */
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top