Hello,
I'd been trying to get a font to work using an internal style sheet when it was placed in the body tag and it didn't want to. So, I then decided to place it in a wrapping div and then it worked.
Why would this have happened?
cheers
| SitePoint Sponsor |


Hello,
I'd been trying to get a font to work using an internal style sheet when it was placed in the body tag and it didn't want to. So, I then decided to place it in a wrapping div and then it worked.
Why would this have happened?
cheers
Baz
---





Hello
this is how you do fonts in a internal style sheet
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>12345 12345 12345 12345 12345 </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> body{ font-family:"Monotype Corsiva",Verdana, Arial, Geneva, Helvetica, sans-serif; font-size:2em; color:#00008b; text-align:center; } </style> </head> <body> font by CSS </body> </html>


Sorry, my post was crap. I know how to place the font in an internal style sheet. I want to know why it worked when placed in a div and not in the body tag.
Baz
---





Hello
your example please,
My example now its not valid html but this seems to work in the body and div
in all browsers
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>12345 12345 12345 12345 12345 </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <div> <style type="text/css"> body{ font-family:"Monotype Corsiva",Verdana, Arial, Geneva, Helvetica, sans-serif; font-size:2em; color:#00008b; margin-top:1em; text-align:center; } </style> font by CSS </div> </body> </html>
Last edited by all4nerds; Jun 6, 2005 at 06:20.


This is the code
HTML Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Title</title> <style type="text/css"> \\TAGS body { background-color:#ffffff; } #wrapper { position:relative; top:-15px; width:550px; font-family: Arial, Helvetica, Sans-Serif; font-size:12px; } </style> <body> <div id="wrapper"> Text text text text text text text text text text text text text text </div> </body> </html>
The font defining will not work when it is placed in the body rules in the style.
I know it should work, but, it doesn't want to.
So I just want to know why...
Baz
---





Hello
and what is this \\TAGS ??


That should work (if you remove the \\TAGS thing), unless there are other rules that you're not showing us.
Birnam wood is come to Dunsinane


Ah, confused on how to do comments....
Cheers
Baz
---





Hello
/* comments in css sheet */


Cheers
Baz
---
Bookmarks