English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die Eigenschaft "align" des Elements <input> wird nur mit <input type ="image"> verwendet und bestimmt die Ausrichtung des Bild-Inputs basierend auf den umliegenden Elementen.
HTML-Formular mit Bild als Submit-Button. Der Submit-Button ist linksbündig:
<!DOCTYPE html> <html> <head> <title>HTML:<input> align-Eigenschaft - Grundtutorials.net(oldtoolbag.com)</title> <body> <form action="action_page.php"> First name: <input typ="text" name="fname"><br> <input typ="image" src="submit.gif" alt="Submit" align="left" width="48" höhe="48"> </form> </body> </html>Testen Sie, ob ‹/›
IEFirefoxOperaChromeSafari
Hinweis:In allen Hauptbrowsern funktionieren nur die Werte "left" und "right" der Eigenschaft "align" normal.
HTML5 The align attribute of <input> is not supported. Please use CSS instead.
In HTML 4.01 In the <input> align attribute is deprecated.
The align attribute can only be used with <input type="image">, it specifies the alignment of the image input relative to other elements around it.
In HTML 4.01 In the <input> align attribute is deprecated. Please use CSS instead.
CSS Syntax: <input type="image" style="float:right">
CSS Example: Align Input Image
In our CSS tutorial, you can find more about float Attributedetails.
<input align="left|right|middle|top|bottom">
Value | Description |
---|---|
left | Align image to the left (default). |
right | Align object to the right. |
top | Align image upwards. |
middle | Align image centrally. |
bottom | Align image downwards. |