473,796 Members | 2,509 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

font-size inheritance IE6 problem

The following code works in firefox. But IE displays the hyperlink at
font-size=13 rather than font-size=10. Why? If its a known IE bug, how
should I fix it? I always want the hyperlinks to take the size of the
next parent element's class.

thanks for the help,
Shashi

<HTML>
<head><Title>Ex ample For cellspacing</Title>
<style>
* {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 13px;
}

a, a:visited {
font-size: inherit;
color: #0000FF;
text-decoration: none
}

a:hover {
color: #FF0000;
}

..footer {
color: #FFFFFF;
text-align: center;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 10px;
background-color: #999966;
}
</style>
</head>
<BODY>
<p class="footer">
this is <a href="#">a footer</athat you would never use.
</p>
</BODY>
</HTML>

Jul 13 '06
15 2461
On Fri, 14 Jul 2006, Chris F.A. Johnson wrote:
On 2006-07-14, Alan J. Flavell wrote:
On Fri, 14 Jul 2006, Chris F.A. Johnson wrote:
On 2006-07-14, Beauregard T. Shagnasty wrote:
sr*******@gmail .com wrote:

font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 13px;

http://k75s.home.att.net/fontsize.html

Or, for a more accurate comparison:
<http://cfaj.freeshell. org/testing/verdana-helvetica.shtml >
There's two things wrong with the cited snippet of CSS: the
specification in px units, and the use of Verdana alongside other
fonts.

You must be looking at a different page;
No, I'm looking at the "cited snippet of CSS", which you helpfully
re-quoted, but seem to have ignored.
there is no "px" anywhere on it.
Feel free to look at it again, then:
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 13px;
http://cfaj.freeshell.org/testing/ve...elvetica.shtml is a fine
comparison of two fonts at size 1em - or it would be for someone who
had Helvetica (mine is falling back to the browser's configured
default, which rather spoils the effect), but doesn't address the
(mis)use of px units at all.

I wasn't addressing the use of px units;
Confirmed. But I already said that.
I was pointing out that there is nothing wrong with using Verdana.
I drew the opposite conclusion from your demonstration, though.

cheers
Jul 14 '06 #11
Veerle wrote:
The idea is great, but in reality it doesn't always work because
people can put online as crappy html as they whish. But of course, it
is good to advise website authors not to do this, so maybe one day,
most of the websites get it right. Although I don't believe that will
ever happen.
Hey, that's normal; in the real world, most things suck, and good stuff
is very rare. It'll never be different. But if people who can tell the
difference don't insist on quality, the good stuff will become even rarer.

That's philosophy.

--
Jack.
Jul 14 '06 #12
On 2006-07-14, Alan J. Flavell wrote:
On Fri, 14 Jul 2006, Chris F.A. Johnson wrote:
>On 2006-07-14, Alan J. Flavell wrote:
On Fri, 14 Jul 2006, Chris F.A. Johnson wrote:

On 2006-07-14, Beauregard T. Shagnasty wrote:
sr*******@gmail .com wrote:

font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 13px;

http://k75s.home.att.net/fontsize.html

Or, for a more accurate comparison:
<http://cfaj.freeshell. org/testing/verdana-helvetica.shtml >

There's two things wrong with the cited snippet of CSS: the
specification in px units, and the use of Verdana alongside other
fonts.

You must be looking at a different page;

No, I'm looking at the "cited snippet of CSS", which you helpfully
re-quoted, but seem to have ignored.
>there is no "px" anywhere on it.

Feel free to look at it again, then:
> font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 13px;
Sorry; I should have snipped that from my first post; it is not
relevant to my point.

[snip]
>I was pointing out that there is nothing wrong with using Verdana.

I drew the opposite conclusion from your demonstration, though.
On what grounds?

--
Chris F.A. Johnson, author <http://cfaj.freeshell. org>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
Jul 14 '06 #13
Veerle <ve*********@ho tmail.comwrote:
I always go with the stylesheet of the author. I've never in my life
changed the style of a website I visit to my own or the browsers one.
I usually leave the author's style sheet in place too, unless I need to
switch to my browser's User Mode (which disables a lot more than the
author's style sheet).

My user style sheet has just a few !important rules that target specific
problems. Combined with browser settings like Minimum Font Size, it reduces
the need to switch to User Mode. It isn't a complete design of its own, and
I don't replace the author's style sheet with my user style sheet.

Unless the design is so bad that I switch to User Mode, that is.
Except maybe for people who can't read small fonts very well and want to
set the font to a larger one or change foreground and background color to
very very contrasting ones.
No one can read "small fonts" very well. It's just that the definition of
"small fonts" varies from person to person, and from display environment to
display environment. On my high-res displays, a minimum font size of 12px
is comfortable and reasonable to me. In some other display environment or
for someone with better/worse vision than mine, 12px might be huge or
illegibly small.
But even then, a lot of the websites on the internet use fixed font
sizes (like the example above) so it won't work anyway.
Says who? The rule

html, body { font-size: 100% !important ; }

goes a long way. Throw in Minimum Font Size and you can repair a lot of
microfont problems automatically.
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"There is no right way to do the wrong thing."
Jul 14 '06 #14
On Fri, 14 Jul 2006, Darin McGrew drags above the scorefile horizon
that:
Veerle <ve*********@ho tmail.comwrote:
But even then, a lot of the websites on the internet use fixed font
sizes (like the example above) so it won't work anyway.
The reality is that there is no such thing as "fixed font sizes" on
the WWW.

Even if you specify CSS px units, or pt units, you'll have a hard time
finding a display on which they are displayed in full and accurate
conformance with the applicable specifications.

Over and above the fact that different users have different needs,
your supposed "fixed" font sizes are going to end up different anyway.

Knowing that px and pt units not only don't work to specification but
aren't what the user needs, it isn't too hard to make a good choice,
IMHO.
Says who? The rule

html, body { font-size: 100% !important ; }

goes a long way. Throw in Minimum Font Size and you can repair a lot of
microfont problems automatically.
Indeed.

Jul 14 '06 #15

"Jack" <mr*********@no spam.jackpot.uk .netwrote in message
news:e9******** ***********@new s.demon.co.uk.. .
The "cascade" refers to the author -browser-default -user-preference
succession of style sources, not to the business of style inheritance.
Yes, it's about precedence, not inheritance, but not specifically three
style sources. The cascade can include multiple stylesheets from one or more
sources.

http://www.w3.org/TR/CSS1#the-cascade

Daibhidh

Jul 18 '06 #16

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

Similar topics

1
4190
by: Justin Van Patten | last post by:
Hello, I am having trouble converting a LOGFONT structure to a System.Drawing.Font object. I'm calling SystemParametersInfo to get the LOGFONT lfntSMCaptionFont from a NONCLIENTMETRICS structure. I seem to be doing this correctly, but when I try to create a System.Drawing.Font object with the Font.FromLogFont, the new Font object has a different Name than the LOGFONT.
1
3491
by: Stephen | last post by:
I am unable to get intelligent font matching to work. I used a @font-face with a Panose-1 descriptor. I tried it with both Internet Explorer 6 and Firefox on Windows 98 SE. The Panose numbers are from the Windows Registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Panose. I am unsure if I made a coding error, or if the browsers do not support intelligent font matching, or if there is some other cause. In the example shown...
3
26569
by: Wim | last post by:
I would like to store the ListView font in the XML config file. So I have a string variable listFont that stores the font (font.ToString()). It must be a string variable because a Font object cannot be written to the XML config file. Next time the program is started the font is read from the config file. But how to convert the string to a Font object? -- Wim
6
1922
by: ryan.mclean | last post by:
Hi all! I was hoping someone could help me out. What I would like to do is use a font that is not installed on the server, but does reside in my local web. Does that make sense? I would like to take the responsibility off the server administrator and put it back on the developers. I realize I may be asking for the impossible, but any ideas are appreciated. The application is creating an image object and Response.OutputStream them.
6
2430
by: Mika M | last post by:
Hi! I'm trying to print barcodes paper printings of my VB .NET (2003) Windows forms application. Earlier I used Code39.TTF (True Type Font) with VB6, and it was working fine, but now can't get barcodes with VB .NET with the same font !? I downloaded demo .OTF-barcode font (Open Type Font), and using it with VB.NET I can get barcode printings using Crystal Reports .rpt-files of my application, and using Printing.PrintDocument too. I'm...
4
1942
by: BobAchgill | last post by:
Is it possible to use a font that is not stored in the windows font directory? I would like to use a font that is stored in my application directory... But this does not seem to work... rtbMyRichTextBox.SelectionFont = New Font(CurDir() + "\" + "MyFont.ttf", 12, FontStyle.Bold) Thanks!
3
9444
by: dave | last post by:
Hello: I have array of Label controls allocated danamically. When I'm trying to change font as: LabelLeft.Font.Strikeout = false; I have error: "Property or indexer 'System.Drawing.Font.Strikeout' cannot be assigned to
1
2728
by: Henry Jones | last post by:
I found some code to change the font on a button to bold: private void btnBold_Click(object sender, System.EventArgs e) { btnCalculate.Font = new Font(btnCalculate.Font, btnCalculate.Font.Style | FontStyle.Bold);
24
2843
by: Tony Girgenti | last post by:
Hello. Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a windows XP Pro, SP2. Before printing a document, i want to set the font to a font that is only available with the printer that i am printing to(Zebra TLP2844). When i open Word and look at the fonts available for the default printer, it does not show the fonts i want. If i cahnge the printer to the printer that
16
1886
by: carlbernardi | last post by:
Hi, I was wondering if there is way use a font that is somehow kept in the code instead of having to load it? I am working on a single script that so far can produce images and html but I have not been able to figure out a way that it can also produce a font. Thanks Carl
0
9680
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
9528
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
10230
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...
1
10174
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7548
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
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
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.