X
Tap here to go to the mobile version of the site.

Support Forum

How make text invisible now that <font> is obsolete? What works according to w3c doesn't work in Firefox.

Posted

Working code was:

<h4 id="02">                                                      /* Heading address */
<a href="#TOC">And the Disbenefits</a>    /* Minor Heading. Return to Table of Contents when clicked */
<span class="navb">                                         /* Tufte left-margin-button code */
<font color="transparent">▼ ▽</font>        /* Blank out major-heading buttons */
<a href="#01">⩓</a> <a href="#03">⩔</a>  /* Show minor previous- and next-buttons */
</span></h4>                                                     /* Close Tufte-hack and heading */

["navb" puts 4 triangular navigation buttons in the left margin, a la Edward Tufte. The buttons should not appear to move if you leave the mouse alone while running down the headings. For most major headings, the first triangle is white, pointing up, and 2 pixels wider than the black button shown, which goes to the final header.]

This made the large triangles disappear for minor headings, without disturbing the small triangles. No other approach I could find prevents jitter when running through a list also containing headers with buttons like

<h2 id="00">                                                                          /* Heading address */
<a href="#TOC">BENEFITS OF RELIGION</a>               /* MAJOR heading. Return to TOC when clicked. */
<span class="navb">                                                          /* Tufte-hack */
<a href="#RD">▼</a> <a href="#09">▽</a>&emsp;  /* FINAL and NEXT major headings */
<a href="#01">⩔</a> </span></h2>                                /* Previous minor meading. Close everything. */

, because the triangles are different sizes for different colors (SLOVENLY FONT DESIGN ! ). But went obsolete after I implemented 400 of these section headings. If you modify the w3c page

https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_font_color_css

you find that

<span style="color:transparent">▼ ▽</span>
works  well -- but not in Firefox. What to do?

Working code was: <pre><nowiki><h4 id="02"> /* Heading address */ <a href="#TOC">And the Disbenefits</a> /* Minor Heading. Return to Table of Contents when clicked */ <span class="navb"> /* Tufte left-margin-button code */ <font color="transparent">▼ ▽</font> /* Blank out major-heading buttons */ <a href="#01">⩓</a> <a href="#03">⩔</a> /* Show minor previous- and next-buttons */ </span></h4> /* Close Tufte-hack and heading */</nowiki></pre> ["navb" puts 4 triangular navigation buttons in the left margin, a la Edward Tufte. The buttons should not appear to move if you leave the mouse alone while running down the headings. For most major headings, the first triangle is white, pointing up, and 2 pixels wider than the black button shown, which goes to the final header.] This made the large triangles disappear for minor headings, without disturbing the small triangles. No other approach I could find prevents jitter when running through a list also containing headers with buttons like <pre><nowiki><h2 id="00"> /* Heading address */ <a href="#TOC">BENEFITS OF RELIGION</a> /* MAJOR heading. Return to TOC when clicked. */ <span class="navb"> /* Tufte-hack */ <a href="#RD">▼</a> <a href="#09">▽</a>&emsp; /* FINAL and NEXT major headings */ <a href="#01">⩔</a> </span></h2> /* Previous minor meading. Close everything. */</nowiki></pre> , because the triangles are different sizes for different colors (SLOVENLY FONT DESIGN ! ). But <font> went obsolete after I implemented 400 of these section headings. If you modify the w3c page https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_font_color_css you find that <pre><nowiki><span style="color:transparent">▼ ▽</span></nowiki></pre> works well -- but not in Firefox. What to do?

Modified by cor-el

Chosen solution

You can't use <span color="transparent">This is some text.</span> because span doesn't have a 'color' attribute. This cannot work in any sane browser.

You should use CSS style, like this:

<span style="color:transparent">This is another text</span>

or even <span style="display:none">This is invisible text.</span>

Read this answer in context 1
Quote

Additional System Details

Installed Plug-ins

  • Shockwave Flash 32.0 r0

Application

  • User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0

More Information

Question owner

Submitter's apology:

The page destroyed my code and careful formatting during transmission. Basically, replacing angle brackets with square brackets, my post asked why doesn't replacing:

[font color="transparent"]▼ ▽</font

with

[span color="transparent"]▼ ▽/span

work in Firefox as it does in w3c?

Submitter's apology: The page destroyed my code and careful formatting during transmission. Basically, replacing angle brackets with square brackets, my post asked why doesn't replacing: [font color="transparent"]▼ ▽<[/font] with [span color="transparent"]▼ ▽[/span] work in Firefox as it does in w3c?
Was this helpful to you?
Quote
TyDraniu
  • Top 25 Contributor
283 solutions 1589 answers

Chosen Solution

You can't use <span color="transparent">This is some text.</span> because span doesn't have a 'color' attribute. This cannot work in any sane browser.

You should use CSS style, like this:

<span style="color:transparent">This is another text</span>

or even <span style="display:none">This is invisible text.</span>

You can't use ''<nowiki><span color="transparent">This is some text.</span></nowiki>'' because span doesn't have a 'color' attribute. This cannot work in any sane browser. You should use CSS style, like this: ''<nowiki><span style="color:transparent">This is another text</span></nowiki>'' or even ''<nowiki><span style="display:none">This is invisible text.</span></nowiki>''
Was this helpful to you? 1
Quote

Question owner

The style="display:none"> makes the triangles disappear, but they no longer serve as place-holders, which was the desired function. style="color:transparent" does the job. It seemed to me that if what was IN the span had a color attribute, this should work. Guess not! Programming is an experimental science.

The style="display:none"> makes the triangles disappear, but they no longer serve as place-holders, which was the desired function. style="color:transparent" does the job. It seemed to me that if what was IN the span had a color attribute, this should work. Guess not! Programming is an experimental science.
Was this helpful to you?
Quote
Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.