Learn HTML

CSS Introduction

CSS Basic Syntax

CSS Selector

CSS Units

CSS Text

CSS Border

CSS Outline

CSS Padding

CSS Margin

CSS Height & Width

CSS Overflow

CSS Resize

CSS Background

CSS Box Sizing

CSS Position

CSS Float

CSS Clear

CSS Clip Path & Shape Outside

CSS Display

CSS Media Queries

CSS Pseudo Classes & Elements

CSS Filter

CSS Transition

CSS Transform

CSS Animation

CSS List Style

CSS Table

CSS Scrollbar Styling

CSS Icon

CSS Cursor

CSS Variable & Calc

CSS User Select

CSS Flexbox

Learn Javascript

Learn Django

Everything about css overflow property

What is overflow in css?

Imagine we have a box and we fixed it's height or width, and we put some
data in it, but when or if we put
more data then the data comes out from the box.
It means the data is overflowing from the box. It happens because of the height or width is
fixed but the data is too much and can't set in that height or width. To solve this
problem we have overflow property.
Overflow has three properties:
overflow
Used to handle overall problem in both x and y axis.
overflow-x
Used to handle overflow in x-axis
overflow-y
Use to handle overflow in y axis

These properties has four values:
hidden;
It means the overflowing data will be hidden.
scroll;
It means a scroll bar will create and we can see the
data by scrolling.
auto;
It means create a scroll bar depends on program. If scroll bar is needed
then create a scroll bar and if not then don't create.
visible;
It is the default value.It will left the data as it is.

<!DOCTYPE html>
<html>
<head>
<title> </title>
<style>
</style>
    #first_heading{
        border:solid 5px red;
        padding:10px;
        width:50px;
        height:80px;
        overflow:auto;
    }
    .last_heading{
        border:solid 5px red;
        padding:10px;
         width:60px;
        height:100px;
        overflow-x:auto;
    }
</head>
<body>

<h2 id="first_heading">
    Welcome to this website
    Welcome to this website
    Welcome to this website
    Welcome to this website
    Welcome to this website
</h2>
<h3 class="last_heading">
    Welcome to this website
    Welcome to this website
    Welcome to this website
    Welcome to this website
    Welcome to this website
</h3>

</body>
</html>

CodersAim is created for learning and training a self learner to become a professional from beginner. While using CodersAim, you agree to have read and accepted our terms of use, privacy policy, Contact Us

© Copyright All rights reserved www.CodersAim.com. Developed by CodersAim.