Solved

Chrome - overflow='auto'

Posted on 2010-08-25
10
1,007 Views
Last Modified: 2013-12-07
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
Comment
Question by:VapiSoft
  • 5
  • 4
10 Comments
 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
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
 

Author Comment

by:VapiSoft
Comment Utility
I tried all but nothing works.
0
 

Author Comment

by:VapiSoft
Comment Utility
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
 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
check for the typo here, it should be
obj.style.height=155;

0
 

Author Comment

by:VapiSoft
Comment Utility
I don't see any difference between what I wrote and what you wrote.
I don't see any typo.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
Comment Utility
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
 
LVL 54

Expert Comment

by:b0lsc0tt
Comment Utility
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
 

Author Comment

by:VapiSoft
Comment Utility
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
 

Author Closing Comment

by:VapiSoft
Comment Utility
As I wrote, it was my mistake.
0
 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
Thanks for the points :)
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now