left property
Specifies the left coordinate of a positioned element.
A positioned element is an element whose position property is set to relative, absolute or fixed.
The value of the left property specifies the left position of the element including
the padding, scrollbar, border and the margin.
JavaScript page for this property: left. You can find other example(s) there. |
Possible values:
One of the following values:
Default. The left coordinate of the object is in accordance with the default layout of the page. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
The left coordinate of the element in length units. For the supported length units, see the length page. | |||||||
The left coordinate is the specified percentage of the width of the parent object. |
Default: auto.
Example HTML code 1:
This example illustrates the use of the left property:
|
||||
<head> <style> .example { position: relative; left: -50px; top: -20px; } </style> </head> <body> <img src="bg.jpg"> <span class="example">over image</span> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
a, abbr, acronym, address, applet, b, bdo, big, blink, blockQuote, body, button, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, embed, fieldSet, font, form, H1, H2, H3, H4, H5, H6, hr, i, iframe, img, input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, ins, isIndex, kbd, label, legend, li, listing, marquee, menu, nobr, object, ol, p, plainText, pre, q, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, table, textArea, tt, u, ul, var, xmp
Related pages:
External links:
User Contributed Comments