Posted by: Pdfprep
Post Date: December 6, 2020
You are developing an HTML5 page.
The page includes the following code.
The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left style for the inner paragraph to the appropriate value.
You need to set the position property of the inner paragraph.
Which value should you use?
A . absolute
B . static
C . fixed
D . relative
Answer: A
Explanation:
absolute: The element is positioned relative to its first positioned (not static) ancestor element.
Incorrect:
Not D:
relative: The element is positioned relative to its normal position, so "left:20" adds 20 pixels to the element’s LEFT position.
Reference: CSS position Property
http://www.w3schools.com/cssref/pr_class_position.asp
Leave a Reply