Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 131143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:03:32+00:00 2026-05-11T06:03:32+00:00

I have a div with a width of 250px. When the innertext is wider

  • 0

I have a div with a width of 250px. When the innertext is wider than that i want it to break down. The div is float: left and now has an overflow. I want the scrollbar to go away by using word-wrapping. How can i achieve this?

<div id='Treeview'> <div id='HandboekBox'>     <div id='HandboekTitel'>         <asp:Label ID='lblManual' runat='server'></asp:Label>     </div>     <div id='HandboekClose'>         <asp:ImageButton ID='btnCloseManual' runat='server'              ImageUrl='Graphics/close.png' onclick='btnCloseManual_Click'              BorderWidth='0' ToolTip='Sluit handboek' />     </div> </div> <asp:TreeView ID='tvManual' runat='server' RootNodeStyle-CssClass='RootNode'>     <Nodes>      </Nodes> </asp:TreeView> </div> 

CSS:

#Treeview { padding-right: 5px; width: 250px; height: 100%; float: left; border-right: solid 1px black; overflow-x: scroll; } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:03:33+00:00Added an answer on May 11, 2026 at 6:03 am

    As Andrew said, your text should be doing just that.

    There is one instance that I can think of that will behave in the manner you suggest, and that is if you have the whitespace property set.

    See if you don’t have the following in your CSS somewhere:

    white-space: nowrap 

    That will cause text to continue on the same line until interrupted by a line break.

    OK, my apologies, not sure if edited or added the mark-up afterwards (didn’t see it at first).

    The overflow-x property is what’s causing the scroll bar to appear. Remove that and the div will adjust to as high as it needs to be to contain all your text.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have text like <div style=float:left; width: 250px> PellentesquePellentesquePellentesquePellentesquePellentesquePellentesquePellentesquePellentesquePellentesquePellentesquePellentesquePellentesquePellentesquePellentesquePellentesque feugiat tempor elit. Ut mollis
i have: <div id=question> <div style=float: left; width: 250px;> <asp:Label ID=question runat=server></asp:Label></div> <div> <asp:RadioButtonList
I have the following basic layout: <div id=sidebar style=float: left; width: 250px; display block;></div>
I have the following code snippet: <div id=bookmarks style=height:150px;width:250px; padding-left: 100px;margin-top: -54px;font:16px/26px Georgia, Garamond,
This is the code: <div> <div style=border:1px solid black;width:250px;float:left> <div>1111</div> <div>1111</div> <div>1111</div> <div>1111</div> <div>1111</div>
I have a menu. <div id=ReportMenu class=left-box style = width: 250px;> <p class=section-title> <span>Select
I have a div with a width of 200px. There is text inside that
I have this code <div id=main style=background:#aaaaaa;float:left;height:160px;margin:5px;position:relative;display:block;width:630px;> <div id=1 class=item style=background:#ffaacc;float:left;width:200px;height:150px;margin:5px;position:absolute;left:0px;top:0px;> </div> <div id=2
I have a div with following CSS: div { width:600px; height:auto; } Now my
I have a div with width 600 px. I want to pull the images

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.