473,386 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problem with overflow and parent item stretching

Plater
7,872 Expert 4TB
I have run into a situation, where I am not clear what attribbutes I have set incorrectly.
I have the following snipit of html:
Expand|Select|Wrap|Line Numbers
  1. <div id="divFloatingSearch" >
  2.     <div id="divSearchTop">
  3.         Enter in a search parameter:
  4.         <input name="tbSearchBox" type="text" id="tbSearchBox" onblur="CheckForAutoFill();" />
  5.     </div>
  6.     <div id="divSearchStatus">
  7.         Waiting to search...
  8.     </div>
  9.     <hr  color="maroon"/>
  10.     <div id="divSearchResults" >               
  11.     </div>
  12. </div>
  13.  
And the related CSS is:
Expand|Select|Wrap|Line Numbers
  1. #divFloatingSearch
  2. {
  3.     position: absolute; 
  4.     left: 0.5%; 
  5.     top: 25%; 
  6.     height: 500px;
  7.     width: 200px; 
  8.     text-align: center;
  9.     background-color:#faebd7; 
  10.  
  11.     font-size: 10pt; 
  12.     border: 1px solid;
  13.  
  14. }
  15. #divSearchTop
  16. {
  17. }
  18. #divSearchStatus
  19. {
  20.     width: 98%;
  21.  
  22.     display: block;
  23.     background-color: #ffcc8c;
  24.     font-size: 8pt;
  25.     vertical-align: top;
  26.     text-align: center;
  27.     overflow: visible;
  28. }
  29. #divSearchResults
  30. {
  31.     background-color: #ffff99;
  32.     height: 450px;
  33.     width: 99%;
  34.     overflow: auto;
  35. }
  36.  
Now the behavior I want, is to be able to appendChildren to "divSearchResults" in a way that "divSearchResults" will gain the scrollbars to scroll up/down and "divFloatingSearch" will just stretch to remain a "border" type effect if you will. IE6 exibits this behavior, but FF2 does not resize "divFloatingSearch" to keep up with "divSearchResults".

I would be completely OK with scrapping the scrollbars entirely and just correctly stetching the elements in a downward fashion. Possibly in the way that posting a message here can stretch the light-blue back ground and light-brownish/gray backgrounds with the textarea size.
Does anyone know what attributes I have set inccorectly in the CSS?
Is there like a "minimum-height" type attribute?
Sep 16 '08 #1
12 3601
David Laakso
397 Expert 256MB
I am not clear what attributes I have set incorrectly.
I'm not sure either. Nor is it exactly clear to me what you hope to accomplish.

Min/max height [1] is supported, except in our good friends IE/6 and down. The good news (providing the user does not have js disabled) is that "IE expressions" or javascript can be used to simulate min/max in the lower IEs.

I put up a simple example [2]. Both blocks named .search have no height set. Both inner blocks named .result have a set min-height: 100px;. The behavior to put text in the top block could be programmed. Put enough text in that inside block .result and it will push to the Equator without breaking out the bottom of the outside containing block .search. In other words, the top block is always open-- program it and it will expand vertically. The bottom block is simply text added manually to show how it will expand if that text were programmed. I hope this makes sense...?

[1]
css2.1 specs-- min/max height
[2]
simple example
Sep 17 '08 #2
drhowarddrfine
7,435 Expert 4TB
I think we need to see some html to figure out what's going on.
Sep 17 '08 #3
Plater
7,872 Expert 4TB
[2]
simple example
That example is roughly exactly what I wish to do. Currently, I have removed all height attributes and let the box stay "collapsed" if you will. Since I will have to continue to dev for IE6, I will have to investigate those other methods maybe.

My ultimate end result would be to incorporate what you have in your [2] example, but then have a maximum bound as well that will start to scroll(maybe? I don't like the look of any of it though).

As for what its doing, I have an order form with many fields. Off to the left is this search thing. the results of that search are set in individual <div>s and when clicked, fills the fields with the correct results.

The problem came about with that there could be a LARGE number of results, and I think it bad practice to let it just keep going downward, forcing the user to scroll the WHOLE page (and losing track of the fields that need to be filled in) to possibly find their result. I might just put a size for the box back in and tell it to overflow:auto

I will attempt to break this apart into an example webpage to be shown.
Sep 18 '08 #4
David Laakso
397 Expert 256MB
My ultimate end result would be to incorporate what you have in your [2] example, but then have a maximum bound as well that will start to scroll(maybe? I don't like the look of any of it though)...<trim>
I might just put a size for the box back in and tell it to overflow:auto
Whatever does it for you and yours. I know from nothing about matters of aesthetics, much less functionality, or usablity...
Sep 18 '08 #5
Plater
7,872 Expert 4TB
I think I have decided to let the parent have no height attribute and supplying a static height (px) value for the child div and set overflow auto to on.
It looks the same in IE6/FF2/chrome and I have warmed up to having the scroll bar there.
Thanks for all the help. I also have no concept of asethetics, so having to do it makes my brain hurt.
Sep 18 '08 #6
David Laakso
397 Expert 256MB
Least you make what little is left of my brain hurt, consider setting overflow-y: scroll; Unless you know, of course, your users are very agile and have good eye and hand motor-skills enabling them to read while controlling both an horizontal and vertical scroll bar in your 200px wide block? So much for aesthetics...
Sep 18 '08 #7
Plater
7,872 Expert 4TB
It doesn't seem to cause horizontal scrolling. (I would kill myself if I thought I made something that scrolls left/right)
Plus: overflow-y isn't supported in ie6 :-(
Sep 19 '08 #8
David Laakso
397 Expert 256MB
overflow-y isn't supported in ie6 :-(
Please reload this in IE/ 6.0: overflow-y:scroll; in IE/6.0
"Property overflow-y doesn't exist in CSS level 2.1 but exists in [css3] : scroll"
Apology for the confusing issues of overflow:auto ; / overflow:scroll; / overflow-y:scroll; The above link uses overflow-y:scroll; and works as intended in IE/6.0.
Sep 19 '08 #9
Plater
7,872 Expert 4TB
I've got it working (or so it would seem?) with the regular overflow calls.
No scrolling to the right happens. I think because I specify a width (in px) and it won't go over that, just wraps downward.
ALTHOUGH, I could probably still be hit with problem of having a really long string of characters with no blank space in it. Makes all browsers crap when it happens if you don't do anything about it.
But since I control what comes out of the search, shouldn't ever be an issue.
Sep 19 '08 #10
David Laakso
397 Expert 256MB
OK. Whatever works for you, and the browsers you intend to support, is the name of the game...

Good luck and best wishes for your success.
Sep 19 '08 #11
Plater
7,872 Expert 4TB
OK. Whatever works for you, and the browsers you intend to support, is the name of the game...

Good luck and best wishes for your success.
Which browsers have I not addressed?
IE, FF and Google Chrome are functioning correctly and with no horizontal scroll bars?
Sep 19 '08 #12
David Laakso
397 Expert 256MB
Which browsers have I not addressed?
IE, FF and Google Chrome are functioning correctly and with no horizontal scroll bars?
Can't see it so can't test it or push the envelope by stress testing it in any browser.
Sep 19 '08 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
4
by: Danny Tuppeny | last post by:
Hi all, I've been trying to write some classes, so when I have a parent-child relationship, such as with Folders in my application, I don't have to remember to add a parent reference, as well as...
7
by: Neo Geshel | last post by:
Greetings. I have a serious problem. I have multiple sets of tables, several of which are chained more than two tables deep. That is, I have a parent, a child, and a great-grandchild table. ...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
4
by: Geordie | last post by:
Hi, I'm in the process of converting a production VS 2003 application to VS 2005. To simplify the conversion I'm converting a small piece at a time and then unit testing the code to confirm it...
4
by: tcole6 | last post by:
My problem appears to be Firefox specific. I have a hyperlink that loads a new window. This window contains hyperlinks that call javascript functions in the parent window and then closes the...
8
by: Geoff Cox | last post by:
Hello, When using Internet Explorer, on networked PCs in a college, to view a page of mine with Javascript code in it the "stack overflow" error message appears. When I access the same file...
3
by: shapper | last post by:
Hello, In my GridView I have a HyperLink Field where I set the DataNavigateUrlFormaString MyHyperLinkField.DataNavigateUrlFormatString = "~\RSS.ashx?Channel={0}&Culture=" &...
1
by: joshthomas99 | last post by:
Hello, Yes, I've spent hours reading through all the old postings and searched the net - but couldnt find a solution to the 100% height problem with nested divs. Basically I want the first...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.