Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

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

  • 3 antwurd
  • 1 hat dit probleem
  • 7 werjeftes
  • Lêste antwurd fan ferren

more options

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 <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

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

</font>

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?

Bewurke troch cor-el op

Keazen oplossing

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>

Dit antwurd yn kontekst lêze 👍 1

Alle antwurden (3)

more options

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?

more options

Keazen oplossing

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>

more options

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.