font-size of body style-rule does not work

Discussion in 'ASP .Net' started by =?Utf-8?B?dG9t?=, Feb 22, 2007.

  1. Hi All,

    I have a theme with a Style.css in which I have defined a style rule for the
    body element :

    body
    {
    min-width: 780px;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: center;
    font-family: Verdana, Arial;
    font-size: 8pt;
    color: Black;
    background-color: Ghostwhite;
    }

    I then have a content page based on a master page that implements the theme.

    All rules of the body style are applied, except for the font-size.

    Here's the html-output of the browser for a simpe page:

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head><title>
    Untitled Page
    </title><link href="App_Themes/Forest/Styles.css" type="text/css"
    rel="stylesheet" /></head>
    <body>
    <form name="aspnetForm" method="post" action="Default.aspx"
    id="aspnetForm">
    <div>
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
    value="/wEPDwULLTEwMDUyNjYzMjhkZE+MtGgeO3PmpQonZYA4J/ffFMq1" />
    </div>

    <table width=920 height=100% align=center cellpadding=0 cellspacing=0>
    <tr height=1>
    <td> </td>
    </tr>
    <tr height=150>
    <td class="app_header"> </td>
    </tr>
    <tr height=100%>
    <td width=100% valign=top style="border-left:gray 1px
    solid;border-right: gray 1px solid">
    <table>
    <tr>
    <td> col 1 </td>
    <td> col 2 </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>
    <table width="100%" class="footerTable">
    <tr>
    <td align="center">
    simple footer content
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr height=1>
    <td> </td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    Where you see col1 and col 2, the text does not appear in the correct
    font-size??

    Anyone any ideas?

    thx,
    Tom
     
    =?Utf-8?B?dG9t?=, Feb 22, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?dG9t?=

    Ray Guest

    Well it doesn't make sense to me either.
    Just define the font-size for the table element
    as well in your stylesheet.

    "tom" <> wrote in message
    news:...
    > Hi All,
    >
    > I have a theme with a Style.css in which I have defined a style rule for the
    > body element :
    >
    > body
    > {
    > min-width: 780px;
    > margin: 0;
    > padding: 0;
    > border: 0;
    > text-align: center;
    > font-family: Verdana, Arial;
    > font-size: 8pt;
    > color: Black;
    > background-color: Ghostwhite;
    > }
    >
    > I then have a content page based on a master page that implements the theme.
    >
    > All rules of the body style are applied, except for the font-size.
    >
    > Here's the html-output of the browser for a simpe page:
    >
    > <html xmlns="http://www.w3.org/1999/xhtml" >
    > <head><title>
    > Untitled Page
    > </title><link href="App_Themes/Forest/Styles.css" type="text/css"
    > rel="stylesheet" /></head>
    > <body>
    > <form name="aspnetForm" method="post" action="Default.aspx"
    > id="aspnetForm">
    > <div>
    > <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
    > value="/wEPDwULLTEwMDUyNjYzMjhkZE+MtGgeO3PmpQonZYA4J/ffFMq1" />
    > </div>
    >
    > <table width=920 height=100% align=center cellpadding=0 cellspacing=0>
    > <tr height=1>
    > <td> </td>
    > </tr>
    > <tr height=150>
    > <td class="app_header"> </td>
    > </tr>
    > <tr height=100%>
    > <td width=100% valign=top style="border-left:gray 1px
    > solid;border-right: gray 1px solid">
    > <table>
    > <tr>
    > <td> col 1 </td>
    > <td> col 2 </td>
    > </tr>
    > </table>
    > </td>
    > </tr>
    > <tr>
    > <td>
    > <table width="100%" class="footerTable">
    > <tr>
    > <td align="center">
    > simple footer content
    > </td>
    > </tr>
    > </table>
    > </td>
    > </tr>
    > <tr height=1>
    > <td> </td>
    > </tr>
    > </table>
    > </form>
    > </body>
    > </html>
    >
    > Where you see col1 and col 2, the text does not appear in the correct
    > font-size??
    >
    > Anyone any ideas?
    >
    > thx,
    > Tom
     
    Ray, Feb 22, 2007
    #2
    1. Advertising

  3. Keep in mind that the object parent object of the item will override those
    of other items further up the chain. Usually, the body will effect elements
    that are within the body of the document, but not within items like a table.
    You'll want to a style to govern the items that occur within a table cell to
    cover all bases.


    --

    Hope this helps,
    Mark Fitzpatrick
    Former Microsoft FrontPage MVP 199?-2006

    "tom" <> wrote in message
    news:...
    > Hi All,
    >
    > I have a theme with a Style.css in which I have defined a style rule for
    > the
    > body element :
    >
    > body
    > {
    > min-width: 780px;
    > margin: 0;
    > padding: 0;
    > border: 0;
    > text-align: center;
    > font-family: Verdana, Arial;
    > font-size: 8pt;
    > color: Black;
    > background-color: Ghostwhite;
    > }
    >
    > I then have a content page based on a master page that implements the
    > theme.
    >
    > All rules of the body style are applied, except for the font-size.
    >
    > Here's the html-output of the browser for a simpe page:
    >
    > <html xmlns="http://www.w3.org/1999/xhtml" >
    > <head><title>
    > Untitled Page
    > </title><link href="App_Themes/Forest/Styles.css" type="text/css"
    > rel="stylesheet" /></head>
    > <body>
    > <form name="aspnetForm" method="post" action="Default.aspx"
    > id="aspnetForm">
    > <div>
    > <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
    > value="/wEPDwULLTEwMDUyNjYzMjhkZE+MtGgeO3PmpQonZYA4J/ffFMq1" />
    > </div>
    >
    > <table width=920 height=100% align=center cellpadding=0
    > cellspacing=0>
    > <tr height=1>
    > <td> </td>
    > </tr>
    > <tr height=150>
    > <td class="app_header"> </td>
    > </tr>
    > <tr height=100%>
    > <td width=100% valign=top style="border-left:gray 1px
    > solid;border-right: gray 1px solid">
    > <table>
    > <tr>
    > <td> col 1 </td>
    > <td> col 2 </td>
    > </tr>
    > </table>
    > </td>
    > </tr>
    > <tr>
    > <td>
    > <table width="100%" class="footerTable">
    > <tr>
    > <td align="center">
    > simple footer content
    > </td>
    > </tr>
    > </table>
    > </td>
    > </tr>
    > <tr height=1>
    > <td> </td>
    > </tr>
    > </table>
    > </form>
    > </body>
    > </html>
    >
    > Where you see col1 and col 2, the text does not appear in the correct
    > font-size??
    >
    > Anyone any ideas?
    >
    > thx,
    > Tom
     
    Mark Fitzpatrick, Feb 22, 2007
    #3
  4. I know I can define a style for the table element.
    But I would prefer to have the body as the general style, and where
    necessary override by specific classes on for instance tables.

    It's strange that for instance font-family and color are picked up but not
    the font-size.

    Thanks anyway.


    "Mark Fitzpatrick" wrote:

    > Keep in mind that the object parent object of the item will override those
    > of other items further up the chain. Usually, the body will effect elements
    > that are within the body of the document, but not within items like a table.
    > You'll want to a style to govern the items that occur within a table cell to
    > cover all bases.
    >
    >
    > --
    >
    > Hope this helps,
    > Mark Fitzpatrick
    > Former Microsoft FrontPage MVP 199?-2006
    >
    > "tom" <> wrote in message
    > news:...
    > > Hi All,
    > >
    > > I have a theme with a Style.css in which I have defined a style rule for
    > > the
    > > body element :
    > >
    > > body
    > > {
    > > min-width: 780px;
    > > margin: 0;
    > > padding: 0;
    > > border: 0;
    > > text-align: center;
    > > font-family: Verdana, Arial;
    > > font-size: 8pt;
    > > color: Black;
    > > background-color: Ghostwhite;
    > > }
    > >
    > > I then have a content page based on a master page that implements the
    > > theme.
    > >
    > > All rules of the body style are applied, except for the font-size.
    > >
    > > Here's the html-output of the browser for a simpe page:
    > >
    > > <html xmlns="http://www.w3.org/1999/xhtml" >
    > > <head><title>
    > > Untitled Page
    > > </title><link href="App_Themes/Forest/Styles.css" type="text/css"
    > > rel="stylesheet" /></head>
    > > <body>
    > > <form name="aspnetForm" method="post" action="Default.aspx"
    > > id="aspnetForm">
    > > <div>
    > > <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
    > > value="/wEPDwULLTEwMDUyNjYzMjhkZE+MtGgeO3PmpQonZYA4J/ffFMq1" />
    > > </div>
    > >
    > > <table width=920 height=100% align=center cellpadding=0
    > > cellspacing=0>
    > > <tr height=1>
    > > <td> </td>
    > > </tr>
    > > <tr height=150>
    > > <td class="app_header"> </td>
    > > </tr>
    > > <tr height=100%>
    > > <td width=100% valign=top style="border-left:gray 1px
    > > solid;border-right: gray 1px solid">
    > > <table>
    > > <tr>
    > > <td> col 1 </td>
    > > <td> col 2 </td>
    > > </tr>
    > > </table>
    > > </td>
    > > </tr>
    > > <tr>
    > > <td>
    > > <table width="100%" class="footerTable">
    > > <tr>
    > > <td align="center">
    > > simple footer content
    > > </td>
    > > </tr>
    > > </table>
    > > </td>
    > > </tr>
    > > <tr height=1>
    > > <td> </td>
    > > </tr>
    > > </table>
    > > </form>
    > > </body>
    > > </html>
    > >
    > > Where you see col1 and col 2, the text does not appear in the correct
    > > font-size??
    > >
    > > Anyone any ideas?
    > >
    > > thx,
    > > Tom

    >
    >
    >
     
    =?Utf-8?B?dG9t?=, Feb 23, 2007
    #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. Joshua Beall
    Replies:
    14
    Views:
    13,676
    C A Upsdell
    Oct 30, 2003
  2. dave richards
    Replies:
    2
    Views:
    645
    Paul Furman
    Feb 19, 2004
  3. Replies:
    0
    Views:
    1,417
  4. wial
    Replies:
    2
    Views:
    865
  5. mttc
    Replies:
    2
    Views:
    2,467
    Roedy Green
    Jul 3, 2009
Loading...

Share This Page