472,098 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,098 software developers and data experts.

font-size of body style-rule does not work

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>
<tdcol 1 </td>
<tdcol 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
Feb 22 '07 #1
3 2175
Ray
Well it doesn't make sense to me either.
Just define the font-size for the table element
as well in your stylesheet.

"tom" <to*@discussions.microsoft.comwrote in message
news:1E**********************************@microsof t.com...
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>
<tdcol 1 </td>
<tdcol 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

Feb 22 '07 #2
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" <to*@discussions.microsoft.comwrote in message
news:1E**********************************@microsof t.com...
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>
<tdcol 1 </td>
<tdcol 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

Feb 22 '07 #3
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" <to*@discussions.microsoft.comwrote in message
news:1E**********************************@microsof t.com...
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>
<tdcol 1 </td>
<tdcol 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


Feb 23 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

22 posts views Thread by Martin Ernst | last post: by
133 posts views Thread by Philipp Lenssen | last post: by
300 posts views Thread by Ståle Sæbøe | last post: by
3 posts views Thread by Wim | last post: by
3 posts views Thread by pnp | last post: by
6 posts views Thread by Mika M | last post: by
3 posts views Thread by Chubbly Geezer | last post: by
reply views Thread by =?Utf-8?B?Qm9iIFdhaXRl?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.