views:

98

answers:

1

Hi

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?

Thanks!

+1  A: 

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());
Sarfraz
sAc: thanks for replay. ok, I'll look at width() function, seems good solution for me.
volocuga