Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

horizontal scrollbar

How can I make an automatic horizontal scroll bar in my page if the content will overflow in its border.

<html>
     <body>
        <div style ="width: 20px; height:30px; border:1px solid black; overflow:auto">
            <!-- various of text here that can makes it go out the border-->
        </div>  
     </body>
</html>

What if the text in my content is too long, how can I make an automatic horizontal scrollbar?

like image 422
ggcodes Avatar asked Dec 18 '12 02:12

ggcodes


1 Answers

change your code into this:

 <html>
 <body>
    <div style ="width: 20px; height:30px; border:1px solid black; overflow-x:scroll">
        <!-- various of text here that can makes it go out the border-->
    </div>  
 </body>
 </html>
like image 169
SyntaxError Avatar answered Sep 23 '22 21:09

SyntaxError