CSS Left Property

In this chapter you will learn:
What is left property
Values of left property
Example of this property
CSS left property is used to set the left edge of an element. It also help to positioning an element but the condition is the element must be absolute positioned.
Values of left property:
value Description
auto It is the default value of left property which psitioned the element’s left edge
length This value is used to set the position in px, cm etc. It can accept negative values also.
% Used to set the left position in % and it can also accept negative values.
initial Sets the default value

Example of this property:
    <title>Example of left property</title>
    <style type="text/css">
      left:50px;/* left property */
      left:150px;/* left property */
<p id="a"> This is the example of left property</p>
<div> This is the example of left property</div>

Output:- example of height property


In this chapter you have learned about left property so now try it yourself and click on Next button to continue-


Share your thought