Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I disable horizontal scroll in textbox for FireFox?

Status
Not open for further replies.

newbie009

Programmer
Aug 18, 2009
1
US
How can I disable horizontal scroll in textbox for FireFox?

Right now 1 textbox has vertical scroll and other textbox has horizontal scroll.
It only looks like this on FireFox but it looks ugly.

I used this code but it only worked for IE not FireFox:
style="overflow: scroll; overflow-y: scroll; overflow-x: hidden; overflow:-moz-scrollbars-vertical;"

Basically I want only vertical scroll.
Is there a code that works for both browsers?
 
Unfortunately, your problem is more related to breaking a word than overflow.

Textareas are designed to show all the content. When there's more content than the size of textarea, it gets vertical scrollbar to show all the content. However, since HTML cannot break long lines of continuous string, such lines might not fit textareas width and horizontal scroll will appear. This is the case with you. Since your textarea needs to show the content, the only way it can do it is by adding a vertical scrollbar.

You could just remove scrollbars from the second box altogether, since users won't be able to see the content even if they had vertical scrollbar to begin with. You could work it out with a simple input box, because that behaves more in a way you want it.

Sorry, but that is about the only solution.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top