By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,709 Members | 1,586 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,709 IT Pros & Developers. It's quick & easy.

overriding inner nested <font>

P: n/a
Let's say all one can do to override a document's link colors,
<a href="FAQ.aspx"><font color="#0000ff">FAQ</font></a>
is inject things like:
<a href="FAQ.aspx"><span style="color:green"><font
color="#0000ff">FAQ</font></span></a>
only at the <A></Aedges (as I have done above setting WWWOFFLE's
anchor-cached-begin value.)

Which, depending on DOCTYPE, is not strong enough to override the most
inner <fontwhen view in firefox. Nor does color:green!important, nor
<fontitself help as not being deepest nested.
(text-decoration:underline sometimes helps, and background-color seems
to always make it through unscathed.)

Is there anything that can be done here to override the innermost
<fontshort of asking the WWWOFFLE author to change the algorithm to
make sure it is the most inner of all?

Nov 27 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

Dan Jacobson wrote:
Is there anything that can be done here
I asume the nasty HTML is inviolable.

In which case, attach a CSS stylesheet and use a powerful selector
within that to set the properties of the <fonthowever you might wish.
It's rarely hard.

Nov 27 '06 #2

P: n/a
Scripsit Dan Jacobson:
Let's say all one can do to override a document's link colors,
<a href="FAQ.aspx"><font color="#0000ff">FAQ</font></a>
is inject things like:
<a href="FAQ.aspx"><span style="color:green"><font
color="#0000ff">FAQ</font></span></a>
only at the <A></Aedges
So let's assume you have painted yourself in the corner. Is there any
problem with that?

I assume you don't really want to set all links to green color. That would
be both quite easy and quite foolish. Instead, I assume that you want the
normal link colors to take effect, overriding the <fontcrap.
Which, depending on DOCTYPE, is not strong enough to override the most
inner <fontwhen view in firefox.
What makes you think the DOCTYPE incantation has the least impact on this?

And what makes you think there <fonteffect _should_ be overridden by some
enclosing markup? It would be _incorrect_ for a browser to do so, no matter
how clueless <fonttags are from a practical standpoint.
Nor does color:green!important, nor
<fontitself help as not being deepest nested.
I have no idea of what you are talking about. A URL would have helped, as
usual.
Is there anything that can be done here to override the innermost
<fontshort of asking the WWWOFFLE author to change the algorithm to
make sure it is the most inner of all?
Huh? If it's innermost, why make sure it is innermost?

The way to override the default rendering of a <fontelement, or any
element for that matter, is to use a CSS rule that applies to that element.
Setting properties for an enclosing element has no effect unless the inner
inherits some properties.

In this particular case, the problem is that you want the <fontmarkup to
be ignored but don't want (or can't?) remove it. As far as
standards-conforming browsers are considered, that's easy, for the color
issue:
font { color: inherit !important; background: inherit !important; }

This won't work on IE, though.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Nov 27 '06 #3

P: n/a
Dan Jacobson wrote:
Is there anything that can be done here to override the innermost
<fontshort of asking the WWWOFFLE author to change the algorithm to
make sure it is the most inner of all?
How about editing WWWOFFLE's cached files directly to remove the FONT tags

s/\<\/?font [^>]\>//gi;

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Nov 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.