Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I am trying to display code on my site, but the container it is in is 90%, and thus when the code is more that the page can fit, it extends off the the right. I wanted to have it overflow inside a div very much like github.
Thank you :)
Can you do this?
<div style="width:90%; border: solid 1px red;"> //Outer (current div) <div style="overflow: auto;"> //width: auto; (default) <div style="width: 4000px;">Test Wide Content ...</div> //content! </div> </div>
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.