Search
 
SCRIPT & CODE EXAMPLE
 

HTML

how to add horizontal scroll bar in html


    <style>
    h1 {
        color: Green;
    }
     
    div.scroll {
        margin: 4px, 4px;
        padding: 4px;
        background-color: #08c708;
        width: 300px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }
    </style>
</head>
 
<body>
    <center>
        <h1>GeeksforGeeks</h1>
        <h2>
        Making a div horizontally
        scrollable using CSS
      </h2>
        <div class="scroll">
             It is a good platform to learn programming.
             It is an educational website. Prepare for the
             Recruitment drive of product based companies
             like Microsoft, Amazon, Adobe etc with a free
             online placement preparation course. The course
             focuses on various MCQ's & Coding question likely
             to be asked in the interviews & make your upcoming
             placement season efficient and successful. Also,
             any geeks can help other geeks by writing articles
             on the GeeksforGeeks, publishing articles follow few
             steps that are Articles that need little modification
             or improvement from reviewers are published first.
             To quickly get your articles reviewed, please refer
             existing articles, their formatting style, coding style,
             and try to make you are close to them. In case you are a
             beginner, you may refer Guidelines to write an Article
        </div>
    </center>
</body>
 
</html>
Comment

horizontal scroll bar

remove width:100%;
add float:left;
Comment

PREVIOUS NEXT
Code Example
Html :: highlightjs 
Html :: html clear input after submit 
Html :: input number html without e 
Html :: base64 image in html 
Html :: corona cases in pakistan 
Html :: HTML Tag Checker Online 
Html :: jumbotron 
Html :: how can i make a quote element in html 
Html :: display success message after form submit in php 
Html :: placeholder textbox wpf 
Html :: button display text html 
Html :: how to use lottie in html 
Html :: best place to include script in html layout 
Html :: html multi checkbox list 
Html :: where should favicon.ico be placed in flask app 
Html :: tailwind css search bar 
Html :: responsive flexbox navbar 
Html :: svg as button 
Html :: fibonacci series in html 
Html :: how do i get the toggle menu on the right bootstrap 
Html :: accordion bootstrap 5 collapse not working 
Html :: how to accossate an id to html elemtnts 
Html :: button attributes in html 
Html :: bootstrap modal causes page shift 
Html :: bootstrap 5 tab 
Html :: edit box with a drop-down list 
Html :: how to download file html button 
Html :: bootstrap + cards 
Html :: svelte bind store to input 
Html :: textarea bootstrap 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =