Document markup language version question

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi

I have noticed the the following behaviour with my stylesheet settings. If
I include the following line in my aspx page, no matter what font size I
change in my CSS file, it has no effects on my controls but the font-family
DOES change my font but only the size doesn't change at all. If I
completely leave this line out of my documents, everything seems to work
normally.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


style.css

*.mytext {
font-size : "x-small";
font-family : "Comic Sans MS";
font-weight : bold;
color : #333333;
}

Can someone explain why that happens and what's the default markup language
version if I leave it out ?

Thanks
Peter
 
Hi

I have noticed the the following behaviour with my stylesheet settings.  If
I include the following line in my aspx page, no matter what font size I
change in my CSS file, it has no effects on my controls but the font-family
DOES change my font but only the size doesn't change at all.   If I
completely leave this line out of my documents, everything seems to work
normally.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

style.css

*.mytext {
  font-size     : "x-small";
  font-family : "Comic Sans MS";
  font-weight : bold;
  color  : #333333;

}

Can someone explain why that happens and what's the default markup language
version if I leave it out  ?

Thanks
Peter

The purpose of a doctype declaration is to declare the Document Type
Definition (DTD). A DTD is used to determine the rules. The font
family name per CSS grammar rules may contain quoted name and font-
size may not.

http://www.w3.org/TR/CSS2/fonts.html
 
Hi

I have noticed the the following behaviour with my stylesheet
settings. If I include the following line in my aspx page, no matter
what font size I change in my CSS file, it has no effects on my
controls but the font-family DOES change my font but only the size
doesn't change at all. If I completely leave this line out of my
documents, everything seems to work normally.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


style.css

*.mytext {
font-size : "x-small";
font-family : "Comic Sans MS";
font-weight : bold;
color : #333333;
}

Can someone explain why that happens and what's the default markup
language version if I leave it out ?


The default DOCTYPE should be 1.0 Transitional, so leaving out the line
should not change anything. I am not sure what controls do with it,
although it could be examined underneath the hood by using reflector
(from redgate.com - free) to see how it is assigning styles. My guess is
it has a different path when DTD is explicitly assigned, even if to the
same DTD as the default.

CSS will work slightly differently depending on whether classes or IDs
are used, but I have not memorized the rules.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Thanks for your explanation

Peter

Gregory A. Beamer said:
The default DOCTYPE should be 1.0 Transitional, so leaving out the line
should not change anything. I am not sure what controls do with it,
although it could be examined underneath the hood by using reflector
(from redgate.com - free) to see how it is assigning styles. My guess is
it has a different path when DTD is explicitly assigned, even if to the
same DTD as the default.

CSS will work slightly differently depending on whether classes or IDs
are used, but I have not memorized the rules.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top