Overflow Flashcards

1
Q

What is the purpose of the text-overflow property?

A

It controls how text fits when it doesn’t fit in the available space within a single unwrapped line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the necessary conditions for using the text-overflow property?

A

The element must contain a text node, overflow should be hidden, and white-space should be set to nowrap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you prevent text from wrapping when using text-overflow?

A

Set white-space to nowrap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the purpose of the overflow property in the box model?

A

It controls how content overflows within an element’s box.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the overflow property control in relation to child elements?

A

It controls how child elements’ content fits into the parent element when the content needs more space than is available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the overflow property affect in terms of layout?

A

It affects the parent element (a fixed-size window) and its child elements (content that may need more space).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you enable scrolling on the vertical axis of an element?

A

Use the overflow-y property.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you enable scrolling on the horizontal axis of an element?

A

Use the overflow-x property.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the purpose of the overflow shorthand property?

A

It sets both overflow-x and overflow-y properties in one declaration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does overflow: visible do?

A

It is the default value and never hides content, even if it overflows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What happens when overflow: hidden is used?

A

Content is clipped in the specified direction, and no scrollbars are shown.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does overflow: scroll enable?

A

It enables scrollbars, allowing users to scroll through content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the difference between overflow: auto and overflow: scroll?

A

overflow: auto shows scrollbars only if needed and hides them by default, while overflow: scroll always enables scrollbars.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does overflow: clip do?

A

It clips content to the element’s padding box without showing scrollbars.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly