473,480 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

body tag inside a css file doesn't work.Why?

Hello to everyone,
i'm new to css and i have a question.
i have an external css (style.css) , that i link in all html pages.
inside the css file there is a class detais declared as follows:
*================================================= ========== */
..details {
font-family: tahoma, verdana, arial, helvetica;
font-size:11pt;
color:#051E78;

}
*================================================= ========== */
Moreover , inside the css file there is an html tag body declared as follows:
/*================================================= ========== */
body { font-family: tahoma, verdana, arial, helvetica;
font-size:11pt;
color:#051E78;
background-color:#87ceeb;
margin-top:0px;
margin-bottom:0px;
margin-right:0px;
margin-left:0px;
}
*================================================= ========== */
When i apply the details class inside a tag(i.e <td class=details>) everything is ok.
My font size is fixed to 11pt.
However when i don't apply the details class inside a tag (i.e <td>, <tr> or whatsoever) my fonts have variable length.Why does this happen?
I thought that the font size should be (11pt-fixed size) as they lie inside the <body> tag of my html page.
thanks in advance
thanasis
Jul 20 '05 #1
12 6872
Thanasis (sch) wrote:
Hello to everyone,
i'm new to css and i have a question.
i have an external css (style.css) , that i link in all html pages.
inside the css file there is a *class* detais declared as follows:


Please don't post in HTML.

What browser are you using? At first sight, you're right - however, by
not supplying a URL we can't check your other code.

Also, note that fixed font sizes, especially in pt units for screen use,
is a bad idea. Search this group to find out why - do you really want
your fonts to be 0.15in high independent of screen size or resolution?

--
Mark.
Jul 20 '05 #2
Thanks for your reply Mark.

my css url is:

www.greek-properties.biz/style.css

yes i 'd like.Tell my how to do this
thanks in advance
thanasis
"Mark Tranchant" <ma**@tranchant.plus.com> wrote in message
news:bx*******************@stones.force9.net...
Thanasis (sch) wrote:
Hello to everyone,
i'm new to css and i have a question.
i have an external css (style.css) , that i link in all html pages.
inside the css file there is a *class* detais declared as follows:


Please don't post in HTML.

What browser are you using? At first sight, you're right - however, by
not supplying a URL we can't check your other code.

Also, note that fixed font sizes, especially in pt units for screen use,
is a bad idea. Search this group to find out why - do you really want
your fonts to be 0.15in high independent of screen size or resolution?

--
Mark.

Jul 20 '05 #3
my question is why the body tag doesn't work

"Thanasis (sch)" <th*********@hotmail.com> wrote in message
news:40********@news.sch.gr...
Thanks for your reply Mark.

my css url is:

www.greek-properties.biz/style.css

yes i 'd like.Tell my how to do this
thanks in advance
thanasis
"Mark Tranchant" <ma**@tranchant.plus.com> wrote in message
news:bx*******************@stones.force9.net...
Thanasis (sch) wrote:
Hello to everyone,
i'm new to css and i have a question.
i have an external css (style.css) , that i link in all html pages.
inside the css file there is a *class* detais declared as follows:


Please don't post in HTML.

What browser are you using? At first sight, you're right - however, by
not supplying a URL we can't check your other code.

Also, note that fixed font sizes, especially in pt units for screen use,
is a bad idea. Search this group to find out why - do you really want
your fonts to be 0.15in high independent of screen size or resolution?

--
Mark.


Jul 20 '05 #4
I 'm using IE 6
"Mark Tranchant" <ma**@tranchant.plus.com> wrote in message
news:bx*******************@stones.force9.net...
Thanasis (sch) wrote:
Hello to everyone,
i'm new to css and i have a question.
i have an external css (style.css) , that i link in all html pages.
inside the css file there is a *class* detais declared as follows:


Please don't post in HTML.

What browser are you using? At first sight, you're right - however, by
not supplying a URL we can't check your other code.

Also, note that fixed font sizes, especially in pt units for screen use,
is a bad idea. Search this group to find out why - do you really want
your fonts to be 0.15in high independent of screen size or resolution?

--
Mark.

Jul 20 '05 #5
Hello, Thanasis. Please, don't "top-post" (in addition to not
posting HTML). Read my comment below.

/Thanasis (sch)/:
details {
font-family: tahoma, verdana, arial, helvetica;
font-size:11pt;
color:#051E78;

}
body { font-family: tahoma, verdana, arial, helvetica;
font-size:11pt;
color:#051E78;
background-color:#87ceeb;
margin-top:0px;
margin-bottom:0px;
margin-right:0px;
margin-left:0px;
}

When *i apply the details class* inside a tag(i.e <td class=details>)
everything is ok.
My font size is *fixed* to 11pt.
However when *i don't apply the details class* inside a tag (i.e <td>,
<tr> or whatsoever) my fonts have *variable length*.Why does this happen?
I thought that the font size should be (11pt-fixed size) as they lie
inside the <body> tag of my html page.


It would help if you had told us what browser software you use and
if you had posted an URL for the page you're trying with.

I think you're encountering the quirky behavior of IE where only the
'font-family' is inherited by TABLE elements. When you use the
standards-compliance mode this behavior is corrected.

Read the comments under the "TABLE Elements Inherit Text Properties"
heading in "CSS Enhancements in Internet Explorer 6"
<http://msdn.microsoft.com/library/en-us/dnie60/html/cssenhancements.asp>.
Be sure to read about the DOCTYPE switch in that same document and
<http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/doctype.asp>.

--
Stanimir
Jul 20 '05 #6
Don't post to Usenet in HTML (or "rich text"). Use plain text.

Font size indicates its *height*, and isn't related to whether a font is fixed-width or variable-width. Tahoma, Verdana, Arial, and Helvetica are all variable-width fonts, so you specify any of them, variable width is what you're going to get. If you want a monospaced font, use font-family: monospace;.
Jul 20 '05 #7
Harlan Messinger wrote:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-7">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Don't post to Usenet in HTML (or "rich text"). Use =
plain=20
text.</FONT></DIV>

<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Font size indicates its *height*,

Come again? :-)

--

Barbara

http://home.wanadoo.nl/b.de.zoete/html/weblog.html
http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html

Jul 20 '05 #8
Barbara de Zoete <b_********@hotmail.com> wrote:
Harlan Messinger wrote:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-7">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Don't post to Usenet in HTML (or "rich text"). Use =
plain=20
text.</FONT></DIV>

<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Font size indicates its *height*,

Come again? :-)


Ouch! Blame Outlook Express, which I use for this at work. I *did*
select Plain Text format from the menu, but since the original was in
HTML, I guess it ignored me.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #9

Harlan Messinger wrote:
Barbara de Zoete <b_********@hotmail.com> wrote:

Harlan Messinger wrote:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-7">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Don't post to Usenet in HTML (or "rich text"). Use =
plain=20
text.</FONT></DIV>

<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Font size indicates its *height*,

Come again? :-)

Ouch! Blame Outlook Express, which I use for this at work. I *did*
select Plain Text format from the menu, but since the original was in
HTML, I guess it ignored me.


I belive there is somewhere in the setting for OE, something to
uncheck so you don't reply in the same :-)

--
/Arne

Jul 20 '05 #10
Arne <ar********@telia.com> wrote:

Harlan Messinger wrote:
Barbara de Zoete <b_********@hotmail.com> wrote:

Harlan Messinger wrote:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-7">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Don't post to Usenet in HTML (or "rich text"). Use =
plain=20
text.</FONT></DIV>

<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Font size indicates its *height*,

Come again? :-)

Ouch! Blame Outlook Express, which I use for this at work. I *did*
select Plain Text format from the menu, but since the original was in
HTML, I guess it ignored me.


I belive there is somewhere in the setting for OE, something to
uncheck so you don't reply in the same :-)


Reread the part where I said, "I *did* select Plain Text format from
the menu ...."

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #11
Dear Stanimir thanks for your reply,

i have noticed the same problem exists with NN and Mozilla. Not only IE
"Stanimir Stamenkov" <s7****@netscape.net> wrote in message
news:2g************@uni-berlin.de...
Hello, Thanasis. Please, don't "top-post" (in addition to not
posting HTML). Read my comment below.

/Thanasis (sch)/:
details {
font-family: tahoma, verdana, arial, helvetica;
font-size:11pt;
color:#051E78;

}
body { font-family: tahoma, verdana, arial, helvetica;
font-size:11pt;
color:#051E78;
background-color:#87ceeb;
margin-top:0px;
margin-bottom:0px;
margin-right:0px;
margin-left:0px;
}

When *i apply the details class* inside a tag(i.e <td class=details>)
everything is ok.
My font size is *fixed* to 11pt.
However when *i don't apply the details class* inside a tag (i.e <td>,
<tr> or whatsoever) my fonts have *variable length*.Why does this happen? I thought that the font size should be (11pt-fixed size) as they lie
inside the <body> tag of my html page.
It would help if you had told us what browser software you use and
if you had posted an URL for the page you're trying with.

I think you're encountering the quirky behavior of IE where only the
'font-family' is inherited by TABLE elements. When you use the
standards-compliance mode this behavior is corrected.

Read the comments under the "TABLE Elements Inherit Text Properties"
heading in "CSS Enhancements in Internet Explorer 6"
<http://msdn.microsoft.com/library/en-us/dnie60/html/cssenhancements.asp>.
Be sure to read about the DOCTYPE switch in that same document and

<http://msdn.microsoft.com/workshop/a...ects/doctype.a
sp>.
--
Stanimir

Jul 20 '05 #12
/Thanasis (sch)/:
i have noticed the same problem exists with NN and Mozilla. Not only IE


Yes, in quirks mode Mozilla/Netscape 7 is specifically designed to
mimic the broken behavior of Internet Explorer and the old Netscape
4. You may override this "patch" setting:

table { font-size: 100% }

in your stylesheet.

Once, again - please, don't top-post. Thank you.

--
Stanimir
Jul 20 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
6942
by: Chuck Amadi | last post by:
Sorry to bovver you again (again) here's script. I still can't see why the get_payload() doesn't produce the plain text message body of an emails in the testwwws users mailbox. As you can see I...
2
6194
by: Bender | last post by:
Hi, I am wanting to capture an onmousedown event without firing the body tags onload event. Also, if anyone could explain why this happens that would be excellent. I can't see how an...
5
2477
by: Haines Brown | last post by:
I want a centered body, 680px wide, having a red bottom margin. The following works well in galeon, but not in IE5, where the bottom margin steals the full width of the viewpoint. That is, the red...
10
4546
by: VictorG | last post by:
Hello, I am new to JS and am trying to add some HTML into a JS function. So that when called the script as well as the HTML will be invoked. Is there some type of embed mechanism, sort of the...
8
4833
by: localhost | last post by:
I would like to wrap all of the HTML inside of my <body> tag inside a <div> with in my code-behind. I do not want to touch the .aspx page template at all. I know how to make the body tag...
23
3036
by: Big Bill | last post by:
http://www.promcars.co.uk/pages/bonnie.php I don't believe they should be there, can I take them out without stopping the includes from functioning? I'm the (hapless) optimiser on this one... I...
3
2940
by: Water Cooler v2 | last post by:
Questions: 1. Can there be more than a single script block in a given HEAD tag? 2. Can there be more than a single script block in a given BODY tag? To test, I tried the following code. None...
4
2142
by: Haines Brown | last post by:
I wish to select and style elements in a page having a body of a given class. <body class="page"> <div class="inside"> <div id="a"> <p>Content of #a</p> </div> <div class="b"> <p>Content of...
2
2063
by: hon123456 | last post by:
Dear all, I want to know the difference and effect of placing ASP Code in the begining of .asp File and placing code inside <Head</ HeadTag and Placing code inside <body></bodytag. Just as...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7048
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7088
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5342
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4783
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2997
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.