Document markup language version question

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
 
G

Guest

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
 
G

Gregory A. Beamer

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.
 
P

Peter

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top