CSS OVERFLOW

rainbow baker

 CSS OVERFLOW

  • OVERFLOW- property controls what happens to content that is too big to fit into an area.
  • VISIBLE - Default. The overflow is not clipped. The content renders outside the element's box
  • HIDDEN - The overflow is clipped, and the rest of the content will be invisible
  • SCROLL - The overflow is clipped, and a scrollbar is added to see the rest of the content
  • AUTO - Similar to scroll, but it adds scrollbars only when necessary

EXAMPLE:

<!DOCTYPE html>
<html>
<head>
<style>
 h1
{
  color: red;
  text-align: center;
}
p
 {
  font-family: times;
  font-size: 20px;
}
</style>
</head>
<body>
<h1>My First CSS Example</h1>
<p>hello world</p>
</body>
</html>

OUTPUT

            My First CSS Example
                hello world


Tags
Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send