• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1063
  • Last Modified:

Chrome - overflow='auto'

Hi,
I have a WEB site (WEB application) that is a table of boxes (<table><tr><td>...)
In several boxes there are "grig tables" that may have many lines.
I don't want the boxes to expand so I set it as
obj.style.overflow='auto';
and
obj.style.hieght=155;

I works very weel in IE - when there are more lines then it can hold it adds a vertical scrollbar.
But in Chrome (and FireFox) it does not add the scrollbar and expands the box height.

 
0
VapiSoft
Asked:
VapiSoft
  • 5
  • 4
1 Solution
 
Gurvinder Pal SinghCommented:
you need to give overflow:scroll
http://www.w3schools.com/css/pr_pos_overflow.asp

if doesn't work, then also try adding
overflow-x:scroll
overflow-y:scroll
0
 
VapiSoftAuthor Commented:
I tried all but nothing works.
0
 
VapiSoftAuthor Commented:
I checked it with firburg (for firefox) and what I see that although I do
obj.style.height=155;
the width="100%".
So I understand that this is not the way to set the height.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Gurvinder Pal SinghCommented:
check for the typo here, it should be
obj.style.height=155;

0
 
VapiSoftAuthor Commented:
I don't see any difference between what I wrote and what you wrote.
I don't see any typo.
0
 
Gurvinder Pal SinghCommented:
hmm..i was referring to what you wrote in original question.

If you are setting the height to a cell or a row of a table you can do it by
obj.setAttribute("height", "155px");
0
 
b0lsc0ttIT ManagerCommented:
The expert showed this in the example but to emphasize your height needs units.  Most likely pixels.  E.g.obj.style.height = 155px;bol
0
 
VapiSoftAuthor Commented:
I found out that the problem is in another place that afterwards I change the the heigth="100%".
I am sorry and I will give you the points for trying to help.
0
 
VapiSoftAuthor Commented:
As I wrote, it was my mistake.
0
 
Gurvinder Pal SinghCommented:
Thanks for the points :)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now