IT Specialist HTML5 Application Development INF-306 Question # 8 Topic 1 Discussion
INF-306 Exam Topic 1 Question 8 Discussion:
Question #: 8
Topic #: 1
You need to contain overflowing text inside the element ' s border without creating unneeded scrollbars or losing text. Which attribute setting should you use?
The correct setting is overflow: auto;. The requirement is precise: the text must remain inside the element’s border, must not be lost, and scrollbars should not appear unless they are needed. overflow: auto satisfies all three requirements because it clips overflowing content to the element’s box and creates scrollbars only when the content actually exceeds the available space. This preserves access to all text while avoiding unnecessary horizontal or vertical scrollbars when the content fits. overflow: hidden is incorrect because it clips the overflowing text and provides no scrolling mechanism, meaning some content may become inaccessible. overflow: visible is incorrect because the extra text can flow outside the element boundary, violating the requirement to keep content inside the border. overflow: scroll is close but not optimal because it forces scrollbars even when they are not required, which directly conflicts with the instruction to avoid unneeded scrollbars. References/topics: CSS overflow, scroll containers, text containment, content clipping, layout flow.
==========
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit