PC Review


Reply
Thread Tools Rate Thread

Document markup language version question

 
 
Peter
Guest
Posts: n/a
 
      16th Jun 2009
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


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      16th Jun 2009
On Jun 16, 9:12*am, "Peter" <peter...@msn.com> wrote:
> 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

 
Reply With Quote
 
Gregory A. Beamer
Guest
Posts: n/a
 
      16th Jun 2009
"Peter" <(E-Mail Removed)> wrote in
news:#4zd#(E-Mail Removed):

> 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! |
*******************************************
 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      16th Jun 2009
Thanks for your explanation

Peter

"Gregory A. Beamer" <(E-Mail Removed)> wrote in message news:Xns9C2C56E6A28BDgbworld@207.46.248.16...
> "Peter" <(E-Mail Removed)> wrote in
> news:#4zd#(E-Mail Removed):
>
>> 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! |
> *******************************************



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Office should support MathML Markup Language =?Utf-8?B?U3VyaQ==?= Microsoft Word Document Management 0 20th Jan 2006 01:45 PM
Question about File path in different language version Ray Microsoft Windows 2000 Developer 1 1st Apr 2004 02:46 PM
how to use W3C Ink Markup Language to save ink ? Lex Yacc Microsoft C# .NET 0 9th Mar 2004 05:49 AM
Malicious Hypertext Markup Language in Preview Panes DRobe Microsoft Outlook Discussion 9 30th Jan 2004 12:51 PM
Question about OS language version with Visual C++ Benny Microsoft Windows 2000 Developer 1 26th Nov 2003 02:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:00 PM.