Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > font-size of body style-rule does not work

Reply
Thread Tools

font-size of body style-rule does not work

 
 
=?Utf-8?B?dG9t?=
Guest
Posts: n/a
 
      02-22-2007
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
 
Reply With Quote
 
 
 
 
Ray
Guest
Posts: n/a
 
      02-22-2007
Well it doesn't make sense to me either.
Just define the font-size for the table element
as well in your stylesheet.

"tom" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      02-22-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?Utf-8?B?dG9t?=
Guest
Posts: n/a
 
      02-23-2007
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
document.body.scroll does not work in Firefox sam Javascript 5 06-06-2006 01:17 PM
Flash.GotoFrame in DIV layers - does not work on BODY.onLoad on FireFox Atara100@gmail.com Javascript 0 08-29-2005 08:55 AM
<body onload="alert('Hello');"> does not work! Why? =?Utf-8?B?Q2FsdmluIEtE?= ASP .Net 7 08-29-2005 08:03 AM
Not detecting body.scrollTop and body.scrollLeft in IE6 London Boy Javascript 2 01-12-2004 08:44 AM
Why does font-style not work when used in the <BODY> tag? Joshua Beall HTML 14 10-30-2003 02:57 PM



Advertisments