Reputation: 3485
Have a "liquid" layout that has fixed width for left side and "elastic" right side. For some reasons can't change markup of the layout.
The trouble is:
Sometimes the right side becomes very wide (depending on the content inside) and horizontal scrolling appears.
Is there an ability to control max width of the right side to prevent horizontal scrolling?
Say I set min and max allowed values and Jquery decides how to deal with it?
Upvotes: 0
Views: 887
Reputation: 382806
How about hiding the scrollbar with CSS:
overflow-x:hidden;
You need to apply that CSS to your right side bar after which it won't show the horizontal scrollbar.
Note that you can use the width()
method of the jQuery to get the calculated width for an element, example:
alert($('#sidebar-right-id').width());
Upvotes: 1