XHTML1-Transitional / Font size...

R

Rob Meade

Hi all,

I've just started putting my pages together in .net 2.0 moving from 1.1 -
using Visual Studio 2005 - most things have gone smoothly enough - however I
am experiencing a little odd behaviour...

I have a style sheet with my styles in for various parts of the page
including font sizes - for which I'm using syntax like this:

FONT-SIZE: .8em;

to enable the font sizes to scale in the browser if resized....

What I've noticed is that - whilst this was all good in Visual Studio 2003
and my pages rendered correctly, now - the do not! The fonts have gone
tiny....however - if I remove this line from the top of the .aspx created by
2005 - the problem goes away....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

can anyone suggest to me why?

I'm happy to post up the style sheet and html if required (although this
page is a little lengthly)...

Thanks for any help you can offer

Regards

Rob
 
B

bruce barker \(sqlwork.com\)

em is a relative size, to the current font. (size of an 'm' - mut in
publishing terms). when given as a font size, its relative to parent
elements font size. so you need a base size for it to work. (don't set body
to em font).

-- bruce (sqlwork.com)
 
R

Rob Meade

...
em is a relative size, to the current font. (size of an 'm' - mut in
publishing terms). when given as a font size, its relative to parent
elements font size. so you need a base size for it to work. (don't set
body to em font).

Hi Bruce,

Thanks for the reply - I realised about 30 minutes after posting what was
happening (always the way)...

I had a 2 level nesting, so I guess my .8 was actually .8 of a .8 of a .8
(body) etc...

When you mentioned about having a "base" size for it to work and not setting
the body to em - wouldn't I still have the same problem though - ie, if I
set the body to 12px, and then had a table nested inside another table (I
know, I know!)...wouldn't content in the most inner TD be .8 of the
containing outer TD, which itself would be .8 of the 12px for the body?

Thanks for any further assistance,

Regards

Rob
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,125
Latest member
VinayKumar Nevatia_
Top