Jump to content

Horizontal scroll bar


phpgoal

Recommended Posts

Hello,

 

It is not working. When I run the code, it gets fitted in a box. Instead, I want to scroll the bar to the right to see the content. Please help.

<div style="overflow-x:scroll; width: 300px; height: 100px;">
As you can see, once there's enough text in this box, the box will grow 
scroll bars... that's why we call it As you can see, once there's enough text in 
this box, the box will grow scroll bars... that's why we call it a 
scroll box! You could also place an image into the scroll box.
 a scroll box! You could also place an image into the scroll box.
As you can see, once there's enough text in this box, the box will grow 
scroll bars... that's why we call it a scroll box! You could also place 
an image into the scroll box.
<img src="1.JPG" width ="10" height="10"></div>
Link to comment
https://forums.phpfreaks.com/topic/279645-horizontal-scroll-bar/
Share on other sites

CSS

 

white-space: nowrap;

 

Your HTML Revised

 

<div style="overflow-x:scroll; width: 300px; height: 100px; white-space: nowrap;">
    As you can see, once there's enough text in this box, the box will grow
    scroll bars... that's why we call it As you can see, once there's enough text in
    this box, the box will grow scroll bars... that's why we call it a
    scroll box! You could also place an image into the scroll box.
     a scroll box! You could also place an image into the scroll box.
    As you can see, once there's enough text in this box, the box will grow
    scroll bars... that's why we call it a scroll box! You could also place
    an image into the scroll box.
    
    <img src="1.JPG" width ="10" height="10" />
</div>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.