System.Web.UI.HtmlControls Namespace HtmlImage Class
Sets or retrieves the alignment of the image in relation to other Web page elements.
Inline |
<img align = 'absbottom' | 'absmiddle' | 'baseline' | 'bottom' | 'left' | 'middle' | 'right' | 'texttop' | 'top' ... > |
Script |
HtmlImage.Align [ = 'absbottom' | 'absmiddle' | 'baseline' | 'bottom' | 'left' | 'middle' | 'right' | 'texttop' | 'top' ] |
A string that specifies the alignment of the image with respect to other elements on the Web page.
The following table represents the possible values.
Value |
Description |
absbottom |
Aligns the bottom of the object with the absolute bottom of the surrounding text. The absolute bottom is equal to the baseline of the text minus the height of the largest descender in the text. |
absmiddle |
Aligns the middle of the object with the middle of the surrounding text. The absolute middle is the midpoint between the absolute bottom and text top of the surrounding text. |
baseline |
Aligns the bottom of the object with the baseline of the surrounding text. |
bottom |
Aligns the bottom of the object with the bottom of the surrounding text. The bottom is equal to the baseline minus the standard height of a descender in the text. |
left |
Aligns the object to the left of the surrounding text. All preceding and subsequent text flows to the right of the object. This is the default value. |
middle |
Aligns the middle of the object with the surrounding text. |
right |
Aligns the object to the right of the surrounding text. All subsequent text flows to the left of the object. |
texttop |
Aligns the top of the object with the absolute top of the surrounding text. The absolute top is the baseline plus the height of the largest ascender in the text. |
top |
Aligns the top of the object with the top of the text. The top of the text is the baseline plus the standard height of an ascender in the text. |
The property is read/write with no default value.
The below code shows how to declaratively set the Align property of an HtmlImage control at design time.
<img src="~/shared/aspxtreme.jpg" width=100 height=30 border=0
alt="Simply awesome" align="right" runat="server" />
HtmlImage Members