52
QuizMultiple Choice

Unit Test — Unit test

Question 52 • Introduction to Information Technology - EL3701 A

Read the following block of CSS code, and then answer the question.body { position: relative; left: 50px; top: 50px; }What effect would this code have on the display of a box?

Answer
A
All content would be placed 50 pixels to the left of the current box.
B
The current box would be located 50 pixels to the left of the page border.
C
The current box would be located 50 pixels to the left of the next page element.
D
The current box would be located 50 pixels to the left of the first textual element.

Explanation

With position: relative, the box is shifted from where it would normally appear. The left: 50px declaration moves it 50 pixels to the right, while top: 50px moves it 50 pixels down. So none of the choices describes the code exactly; choice B says left, but the box would actually be to the right of its normal position.

AI-written and checked against the verified answer.

Previous
Next