Document markup language version question

Discussion in 'ASP .Net' started by Peter, Jun 16, 2009.

  1. Peter

    Peter 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
    Peter, Jun 16, 2009
    #1
    1. Advertising

  2. On Jun 16, 9:12 am, "Peter" <> 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
    Alexey Smirnov, Jun 16, 2009
    #2
    1. Advertising

  3. "Peter" <> wrote in
    news:#4zd#:

    > 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! |
    *******************************************
    Gregory A. Beamer, Jun 16, 2009
    #3
  4. Peter

    Peter Guest

    Thanks for your explanation

    Peter

    "Gregory A. Beamer" <> wrote in message news:Xns9C2C56E6A28BDgbworld@207.46.248.16...
    > "Peter" <> wrote in
    > news:#4zd#:
    >
    >> 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! |
    > *******************************************
    Peter, Jun 16, 2009
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kerith
    Replies:
    0
    Views:
    505
    Kerith
    Feb 3, 2004
  2. Torsten Bronger
    Replies:
    32
    Views:
    755
    David Bolen
    Sep 1, 2007
  3. V Green
    Replies:
    0
    Views:
    808
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    908
    PA Bear [MS MVP]
    Feb 5, 2008
  5. Ralph Amissah
    Replies:
    0
    Views:
    175
    Ralph Amissah
    Nov 20, 2005
Loading...

Share This Page