Category Archives: HTML

Firefox randomly adding _moz-rs-heading to a-tags

I recently noted that some elements on my page randomly weren’t rendered like I expected even though other elements of the same CSS class were rendered correctly. Looking at the code I noticed that Firefox was adding weird tags to link tags:

<h1>
    <a _moz-rs-heading="" href="/lists/1?locale=en">Gute Weine</a>
</h1>

But not only that. The whole HTML structure was messed up.

The green area highlights a correctly rendered element like it was coded in the plain file. The red area highlights what happened randomly in Firefox.

After a bit of googling it turned out that this false rendering was caused by a mistake from my side: You should not wrap block elements like div and h1 with a link tag. So the HTML really should look more like this:

<li class="list" id="list_19">
    <div class="list_content">
        <h1><a href="/lists/19?locale=en">Einkaufsliste</a></h1>
        <div class="summary">
          <a href="/lists/19?locale=en">
              4 items in total, 3 items done.
              <br />
              Last updated 3 days ago
          </a>
        </div>
    </div>
</li>

In this code a-tags wrap only text elements. img-tag would be fine, too. Other elements you should avoid in order to prevent rendering you don’t expect.

It looks like amongst a lot of other cool stuff HTML5 will bring us also block-level links.

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in HTML | 9 Comments

Using GWT Canvas

One of the exciting new features of HTML5 is the Canvas element. Today evening I checked out two libraries implementing the Canvas element for the Google Web Toolkit.

I can’t really tell which library is better. Both seem to handle the Canvas API well. The biggest disadvantage at the moment is that you can’t run your code in hosted mode. The Incubator version promises that hosted mode works on Mac systems though. Users of other operating system will probably have to wait for OOPHM (Out Of Process Hosted Mode) which will be released along with GWT 2.0.
In my opinion one argument speaking for using the Incubator version is that this version is maintained directly by Google and that you get a lot more cool features by including the Incubator JAR.

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in GWT, HTML | Leave a comment

Times Machine

Die New York Times bietet einen neuen Archiv-Service namens Times Machine an.
Nicht nur das Archiv an sich ist interessant, sondern auch die Tatsache wie es umgesetzt ist.

Häufig wird für ein solches Interface Flash eingesetzt. Die NY Times jedoch hat sich die Mühe gemacht, das User Interface mit HTML, CSS und JavaScript umzusetzen. Das Ergebnis lässt sich sehen und hebt sich von den üblichen Flash-Lösungen ab.

Nachdem man Jahr, Monat und Tag ausgewählt hat, wird die erste Seite der Ausgabe angezeigt. Fährt man mit der Maus über die Artikel werden diese hervorgehoben und es erscheint ein Popup mit einer kurzen Zusammenfassung des Artikels und der Möglichkeit das zugehörige PDF zu öffnen.

nyt.jpg

Einziger Nachteil des Services ist, dass nur einige historische Beispielartikel und die Online-Artikel verfügbar sind. Alle anderen Ausgaben stehen nur Abonnenten zu Verfügung oder über amerikanische Bibliotheken:

TimesMachine is currently available only to home delivery subscribers of The New York Times. If you are not a home delivery subscriber and would like free access to The New York Times page image archive, ask your local librarian for access to Proquest’s Digital Vault.

Schade…

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in History, HTML, JavaScript | Leave a comment

HTML5 Custom Data

HTML 5 wird benutzerdefinierte Attribute für alle HTML-Tags unterstützen. Das ist praktisch und wird den Code gerade im Zusammenhang mit JavaScript wesentlich sauberer machen. Dazu: HTML5 custom data: A possible savior for the poor, overloaded class attribute?

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in HTML | Leave a comment

XHTML Validation Error with Links Widget

XHTML Validation Error

Line 490, Column 8: ID "links" already defined

Diese Fehlermeldung erscheint bei der Validierung der Hauptseite einer Wordpress 2.3 Installation mit aktivierter Widgets Sidebar und aktiviertem Links-Widget.

Der W3C Markup Validator beschwert sich über ein doppeltes Vorkommen der ID “links”.

Möchte man nicht auf das Widget verzichten, lässt sich der Fehler nur durch Editieren der datei wp-includes/widget.php in der Zeile 402 beheben:

function wp_widget_links($args) {
  extract($args, EXTR_SKIP);
  wp_list_bookmarks(array(
    'title_before' => $before_title, 'title_after' => $after_title,
    //'category_before' => $before_widget, 'category_after' => $after_widget,
    'show_images' => true, 'class' => 'linkcat widget'
  ));
}

Einfach die “category_before”-Zeile auskommentieren. Das bewirkt, dass die ursprünglich von der Funktion wp_list_bookmarks vergebene ID und CSS-Klasse verwendet wird.

Ich habe den entspr. Troubleshooting-Eintrag auf Wordpress.org erweitert.

In diesem Sinne: “This Page Is Valid XHTML 1.0 Transitional!” ;-p

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in HTML, PHP, wordpress | 1 Comment