Results 1 to 8 of 8

Thread: Hidden Overflow and Dynamically Resized Parent Node

  1. #1
    Join Date
    Apr 2007

    Hidden Overflow and Dynamically Resized Parent Node

    I am building a help system-like website and I am using a two column table to handle the treeview in the left and the content in the right. I have asked this in the javascript forums (due to the dynamic width) and they suggested I post here. In the left cell I am generating a treeview using divs. These are housed in a 'wrapper' div tag. I am building a resizer that shrinks the width of the treeview's table cell width - but the treeview wrapper div is enforcing its width even though I have it set to overflow: hidden. - Below is a sample, when clicking on the gray vertical bar SHOULD set the cell to a few px, but you can see it is held out to the width of the tree's caption. (I'm testing in FF btw)

        <table id="tblMain" border="1" style="width: 100%;">
    	    <td style="vertical-align: top; width: 200px;">
    		<div id="splSplitter" onclick="this.parentNode.style.width='2px'" style="height: 400px; cursor: e-resize; position: absolute; z-index: 100; width: 4px; left: 250px; background: #dfdfdf;"></div>
    		<div style="overflow: hidden;">
    		  <div id="divEdit"><a href="javascript:EditTree()">Edit Tree</a><br><br></div>
    		  <div id="divTree"><div id="divFld_1" class="tvwFolder" onclick="ToggleFolder('1');">Documents</div><div id="divFldDiv_1" class="tvwFolderDiv" style="display: none;"></div>
    	    <td style="vertical-align: top;">
    		<div id="divBody"></div>

  2. #2
    Join Date
    Sep 2008
    live example somewhere?
    without the javascript and the rest of the css, it's a little difficult to imagine what is going on.
    ...but stupidity is terminal.

  3. #3
    Join Date
    Apr 2007
    I'll put something up Wednesday night and post the url here.

  4. #4
    Join Date
    Dec 2005
    Too many divs. What's the purpose of

    <div style="overflow: hidden;">
    why not overflow: hidden on your table cell?
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...

  5. #5
    Join Date
    Apr 2007
    The overflow: hidden is there to demonstrate how my cell is being forced to the width of the text in the 'treeview' even though it should be hidden etc. I need that table cell to collapse all the way. The onclick above:
    Should collapse it to 2 pixels but when I click that, it seems to stop at the caption's width. This will be a resizable panel in my UI, like a help system, so the user should be able to reduce it narrower than the treeview, but I can't get it to do that.

  6. #6
    Join Date
    Dec 2005
    Did you try overflow:hidden on your table cell while removing the div tag?

    (Removing the div tag here wouldn't accomplish or not accomplish anything, it's just not necessary to have there, in my opinion).
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...

  7. #7
    Join Date
    Apr 2007
    I just tried setting the <td> to hidden overflow and removed the div, but the cell is still being forced to the width of my text. I must be missing something here, I thought the idea of overflow:hidden is to allow the content's parent to be narrower than the content itself. I have taken the code above and changed the left table cell to a width of 2px and an overflow of hidden, and the cell is still rendered at the same width as the text. If I do that same with a <div> THEN it works.

    So I guess my question is, is there some way to get a table cell to treat overflow like a div tag does? I really don't want to have to use frames just to build a help system style UI, and using a divs only layout (as far as I know) would require me to set exact widths on the divs so I can use a float: left without the divs wrapping. I want the layout to be 'full bleed'.

    Thank you all very much for your time, thoughts and suggestions so far!

  8. #8
    Join Date
    Dec 2005
    Well, if you're exploring changing your code, then a table is not the way to go. You're making a tree, so the whole thing should be based on UL.
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.13116 seconds
  • Memory Usage 2,915KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (8)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (73):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates