473,656 Members | 2,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

font size relative to "top level" font size

Hi,

is there a possibility to set the font size to a percent value of the
"top level" font size?

For example:

The font size of the body might be 100% and I have a div which should
have a font size of 80% of this value, independent of other tags around
this div:

<body style='font-size: 12pt'>
<div style='font-size: 90%'>
<div style='???'>tex t with a size of 80% of 12pt, independent
of the 90% of the parent div</div>
</div>
</body>

regards,
Achim
Dec 14 '05 #1
1 1880
Wed, 14 Dec 2005 12:16:30 +0100 from Achim Domma (SyynX Solutions
GmbH) <ac*********@sy ynx.de>:
is there a possibility to set the font size to a percent value of the
"top level" font size?

For example:

The font size of the body might be 100% and I have a div which should
have a font size of 80% of this value, independent of other tags around
this div:


Nope -- no way. It would be useful in some circumstances, but each
element inherits its base size for %age calculations from its parent.
http://www.w3.org/TR/CSS21/fonts.html#propdef-font-size

CSS does have absolute font size like "medium", but you don't want to
use them because you have no idea what size the user has set up in
the browser.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Dec 14 '05 #2

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

Similar topics

2
2634
by: Rob McLennan - ZETLAND | last post by:
Hi, I'm relatively clueless when it comes to correct ASP syntax. I'm testing out a search form for my company's website which is done in ASP. The results are displayed as per the code shown at the very bottom of this message. All I want to do is add a target="top" to the URL which is displayed as a link at the top of the results. I know enough about html to know that it probably goes somewhere into the follwing section: <a href=""" &...
87
5191
by: ziliath | last post by:
I recently tried out the Google "top coder" contest, as a C++ coder. I noticed immediately that they expected me to know STL. To which I say, what the fuck?! I may be missing something, but at what point when learning C++ was I supposed to have picked up STL? I ask because at every job I've had, and every job interview for that matter, whenever STL comes up it's not I, but a manager who says effectively yuck, we don't use that crap.
6
5262
by: Matt | last post by:
When I do the following, the mycode will still execute. The reason I put window.opener=top; is to disable the close confirmation dialog box. window.opener = top; window.close(); //mycode... But if I do the following without statement window.opener = top; window.close();
19
3292
by: Mason A. Clark | last post by:
How was I to know that "top" means "top" in MSIE6 ?? I was testing <a name="top"></a> at the top of the page with <a href="#top>go to top</a> at the bottom of the page. It always worked in IE so I drew conclusions only to discover that it worked even with <a name="xtop"></a> but not in Opera. IE6 understands "top" to mean *the top* !
6
7047
by: Mason A. Clark | last post by:
LAST WORD(s): 1. MSIE6 and Firefox will go to the top of the page on command <a href="#top">go upsy</a> even if there is NO name="top" or id="top" They know what a "top" is :-) Opera does not.
16
4441
by: Gufus | last post by:
Hi Group... <a name="#top"></a> ----del---- ----del---- <img SRC="images/top.gif" USEMAP="#top" BORDER=0> <map NAME="top">
10
23058
by: asnowfall | last post by:
I get following compilation error C3149: 'System::String' : cannot use this type here without a top-level '^'. Could someone explain why I get this error? here is the code... ImageFileData.h ---------------------------
0
8382
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8297
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8717
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
5629
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1930
muto222
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.