position

UK[pəˈzɪʃn] US[pəˈzɪʃən]

n. Position, direction; status, position; attitude; status

vt .Place; put... in a proper position; position...; garrison troops

css position property syntax

Function: The position attribute specifies the positioning type of the element.

Description: This attribute defines the positioning mechanism used to establish the layout of elements. Any element can be positioned, but absolute or fixed elements generate a block-level box, regardless of the type of the element itself. A relatively positioned element is offset from its default position in normal flow.​

Note: All major browsers support the position attribute. The attribute value "inherit" is not supported in any version of Internet Explorer (including IE8).

css position property example

<html>
<head>
<style type="text/css">
h2.pos_abs
{
position:absolute;
left:100px;
top:150px
}
</style>
</head>
<body>
<h2 class="pos_abs">这是带有绝对定位的标题</h2>
<p>下面的标题距离页面左侧 100px,距离页面顶部 150px。</p>
</body>
</html>
Run instance »

Click the "Run instance" button to view the online instance