Homepage selbermachen 7.846 Themen, 35.563 Beiträge

PHP und prozentuale Bildgrössen (@Xafford) ;-)

Heinz_Malcher / 15 Antworten / Flachansicht Nickles


Hi, bei mit will der folgende Befehl einfach nicht klappen:
<?php

echo "<img src=\'test.gif\' height=\'30%\' width=\'40%\'>";

?>


Wer hat einen Tipp??

Es wird einfach garnichts angezeigt, also kein Fehler, sondern das
Bild taucht einfach nicht auf, mit Pixelangaben geht es ohne weiteres,
aber ich brauche Prozentangaben
bei Antwort benachrichtigen
Heinz_Malcher zeek „Aber warum sollte ich mich nicht an s W3 halten, wenn es mit so wenigen Zeilen...“
Optionen

Hier ein Beispiel der W3 Prüfung, es scheitert schon am simpelsten überhaupt und die seite läuft trotzdem mit tausenden klicks pro tag...tja auch so kanns gehen:



Warnings

Warning: No Character Encoding detected! To assure correct validation, processing, and display, it is important that the character encoding is properly labeled. Further explanations.

Below are the results of attempting to parse this document with an SGML parser.

Fatal Error: no document type declaration; will parse without validation

I could not parse this document, because it uses a public identifier that is not in my catalog.

You should make the first line of your HTML document a DOCTYPE declaration, for example, for a typical HTML 4.01 document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Title</TITLE>
</HEAD>

<BODY>
<-- ... body of document ... -->
</BODY>
</HTML>


Sorry, I can't validate this document.
bei Antwort benachrichtigen