---
title: "Overflow property using CSS3 and HTML"  
description: "In this article I have tried to explain how to use overflow property using CSS3 and HTML."  
author: "Vijay Shukla"  
published: 2012-12-17  
updated: 2019-11-24  
canonical: https://www.mindstick.com/articles/1080/overflow-property-using-css3-and-html  
category: "css-css3"  
tags: ["css-css3"]  
reading_time: 2 minutes  

---

# Overflow property using CSS3 and HTML

In this article I have tried to explain how to use overflow property using [CSS3](https://www.mindstick.com/articles/1534/stylish-css3-progress-bars) and HTML. Some [content](https://www.mindstick.com/articles/12369/cms-extension-for-magento-2-advanced-content-manager-2) in an element may fall outside the element’s rendering box for a number of reasons In cases where this occurs, the ‘overflow’ property describes what to do with the content outside the [elements](https://www.mindstick.com/forum/1440/wpf-button-with-multiple-text-elements) rendering area.

```
<!DOCTYPE html>
<html>
<head>
<style>
div.scroll
{
background-color:#D3D3D3;
width:100px;
height:100px;
overflow:scroll;
}
div.hidden
{
background-color:#D3D3D3;
width:100px;
height:100px;
overflow:hidden;
}
div.hiddenX
{
background-color:#D3D3D3;
width:100px;
height:100px;
overflow-x:hidden;
}
div.hiddenY
{
background-color:#D3D3D3;
width:100px;
height:100px;
overflow-y:hidden;
}
</style>
</head>

<body>
<p>The overflow property specifies what to do if the content of an element exceeds the size of the element's box.</p>

<p>overflow:scroll</p><div class="scroll">MindStick is a Microsoft ISV Gold certified software development company specializing in product development, programming and consulting services.
Currently we have three software products named MindStick Cleaner and MindStick DataConverter, MindStick SurveyManager which are available free of cost.

Thnxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...!!!!!!!!!!!!!!! </div>
<p>overflow:hidden</p><div class="hidden">MindStick is a Microsoft ISV Gold certified software development company specializing in product development, programming and consulting services.
Currently we have three software products named MindStick Cleaner and MindStick DataConverter, MindStick SurveyManager which are available free of cost.

Thnxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...!!!!!!!!!!!!!!!  </div>
<p>overflow:hiddenX</p><div class="hiddenX">MindStick is a Microsoft ISV Gold certified software development company specializing in product development, programming and consulting services.
Currently we have three software products named MindStick Cleaner and MindStick DataConverter, MindStick SurveyManager which are available free of cost.

Thnxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...!!!!!!!!!!!!!!! </div>
<p>overflow:hiddenY</p><div class="hiddenY">MindStick is a Microsoft ISV Gold certified software development company specializing in product development, programming and consulting services.
Currently we have three software products named MindStick Cleaner and MindStick DataConverter, MindStick SurveyManager which are available free of cost.

Thnxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...!!!!!!!!!!!!!!!  </div>
</body>
</html>
```

overflow:scroll

Scroll will create a scroll bar on the both axis x as well as y.

![Overflow property using CSS3 and HTML](https://www.mindstick.com/mindstickarticle/3eaf46bf-7086-4fc5-b853-58f52ce37885/images/29706c7e-a399-427e-9194-1bfd36371e9e.png)

##### overflow:hidden

Hidden will hide the both side of axis x as well as y in element's box.

![Overflow property using CSS3 and HTML](https://www.mindstick.com/mindstickarticle/3eaf46bf-7086-4fc5-b853-58f52ce37885/images/4017cdb1-4435-4a4f-b8e1-5c7cb3bad96e.png)

##### overflow-x:hidden

x:hidden will hide the x axis contents in element's box.

![Overflow property using CSS3 and HTML](https://www.mindstick.com/mindstickarticle/3eaf46bf-7086-4fc5-b853-58f52ce37885/images/a7a1f177-dda7-43b0-ab7b-699aa486560f.png)

##### overflow-y:hidden

y:hidden will hide the y axis contents in element's box.

![Overflow property using CSS3 and HTML](https://www.mindstick.com/mindstickarticle/3eaf46bf-7086-4fc5-b853-58f52ce37885/images/016ddd32-2a8c-4cb1-b828-1de9c331d05e.png)

---

Original Source: https://www.mindstick.com/articles/1080/overflow-property-using-css3-and-html

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
