<!DOCTYPE html>
<
html
>
<
head
>
<
title
>
DOM Style overflowX Property
</
title
>
<
style
>
.content {
background-color: lightgreen;
height: 150px;
width: 200px;
white-space: nowrap;
/* Setting the overflow-x property to 'scroll' to
observe the effect of initial */
overflow-x: scroll;
}
</
style
>
</
head
>
<
body
>
<
h1
style="color: green">
GeeksforGeeks
</
h1
>
<
b
>DOM Style overflowX Property</
b
>
<
p
>
The overflowX property specifies the behavior of
content when it overflows a block-level element’s
left and right edges.
</
p
>
<
div
class="content">
GeeksforGeeks is a computer science portal with a
huge variety of well written and<
br
> explained
computer science and programming articles, quizzes
and interview questions. <
br
>The portal also has
dedicated GATE preparation and competitive
programming sections.
</
div
>
<
button
onclick="setOverflow()">
Change overflowX
</
button
>
<
script
>
function setOverflow() {
elem = document.querySelector('.content');
elem.style.overflowX = 'initial';
}
</
script
>
</
body
>
</
html
>