www.webdeveloper.com
Results 1 to 9 of 9

Thread: DIV and scrollbar

  1. #1
    Join Date
    Nov 2006
    Posts
    114

    Question DIV and scrollbar

    Hi,

    I have a web page which is displayed under IE and FF without any problem.
    However, under Opera it display a scroll bar (but not active = not scrollable).

    i've checked the css code and everything seems ok (no pixel outside the div)
    so where could be the problem located ?

    thanks a lot,

    A.

  2. #2
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    Would need to see your code. I suspect that the width of the item closely matches the parent's width (say, a 760px 'container' in a 770px 'wrapper' might cause this, as the scrollbar default-width is 20px, and some browsers include this with the stated "width", others, do not.. a work-around is stating a percentage-width instead... even if that is "width:100%;" this includes any scrollbars, whether needed or not)
    I build for: Firefox and tweak for IE

  3. #3
    Join Date
    Nov 2006
    Posts
    114
    so here is the html code :
    <div id='ID_DivTopMenu' class='Div_TopMenu'>
    <a class='TopNavLink' href='#'>Contact_Us</a>
    |
    <img id='ID_TopNavArrow' class='TopNav_Arrow' src='temp.png' />
    <a id='ID_TopNavLang' class='TopNavLink' href='#'></a>
    |
    <a class='TopNavLink' href=''>My Account</a>
    <div id='ID_DivInterfaceLanguage' class='DivInterfaceLanguage' onmouseover='this.style.display="block";document.getElementById("ID_TopNavLang ").style.color="";' onmouseout='this.style.display="none";'>
    </div>
    </div>
    and here the css file :

    .Div_TopMenu
    {
    height : 20px;
    margin-top : 5px;
    margin-right : 5px;
    color : #5078b4;
    vertical-align : bottom;
    }
    .TopNavLink
    {
    margin : 0px 5px 0px 5px;
    color : #5078b4;
    vertical-align : bottom;
    }
    .TopNavLink:hover
    {
    color : #FAC81E;
    }
    .TopNav_Arrow
    {
    border-style : none;
    vertical-align : bottom;
    margin : 0px 5px 0px 7px;
    cursor : pointer;
    }
    .DivInterfaceLanguage
    {
    z-index: 4;
    position : absolute;
    display : none;
    cursor : pointer;
    border-color : #AAAAAA;
    }
    .UL_LangItem
    {
    margin : 0px 0px 0px 0px;
    padding : 0px 0px 0px 0px;
    vertical-align : middle;
    background-image : url(../images/common/topnav_tab_02.png);
    }
    .LangItem
    {
    margin : 0px 0px 0px 1px;
    padding : 3px 0px 0px 9px;
    vertical-align : middle;
    height : 15px;
    width : 70px;
    list-style: none;
    }
    .LangItem:hover
    {
    margin : 0px 0px 0px 1px;
    padding : 2px 0px 0px 9px;
    vertical-align : middle;
    height : 14px;
    width : 70px;
    list-style: none;
    background-color : #eaeaea;
    border-top-style : solid;
    border-bottom-style : solid;
    border-top-width : 1px;
    border-bottom-width : 1px;
    border-top-color : #FAC81E;
    border-bottom-color : #FAC81E;
    }

    .Div_TabPageTop
    {
    background-image : url(../images/common/topnav_tab_01.png);
    height : 20px;
    width : 81px;
    margin : 5px 0px 0px 0px;
    }
    .Div_TabPageBottom
    {
    background-image : url(../images/common/topnav_tab_03.png);
    height : 5px;
    width : 81px;
    }

  4. #4
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    That's kind of a hodgepodge, isn't it? I am seeing something totally unfamilar. And it is probably necessary to give a DIV an "ID" and a "class" unless the "class" given it going to be re-used again elsewhere on the same page. There is more CSS here than required.
    And for brevity, myself, I'd not name IDs thus: "#DIV_id_nameOfWhatever", I would just name the id, semantically when possible, and be done with it. If this ID is for a "wrapper", call it "#wrapper". If it is a sidebar, call it "#sidebar". Avoid confusion.

    And what is going on here?
    <div id='ID_DivTopMenu' class='Div_TopMenu'>

    is this related to the class below? If so, it's not going to function as-written..

    .Div_TopMenu
    {height : 20px;
    margin:0 5px;
    color : #5078b4;
    vertical-align : bottom;
    }
    I do not see any "#ID_DivTopMenu" at all in your CSS... this is possibly the whole problem.. -DIV(s) and possibly other elements named but incorrectly referanced in the CSS..
    Last edited by WebJoel; 12-31-2007 at 05:12 PM.
    I build for: Firefox and tweak for IE

  5. #5
    Join Date
    Nov 2006
    Posts
    114
    i do not have any free web hosting space for now, so i will give here some screenshots.

    step 1 : no mouse pointer on one of those 3 links.
    step 2 : example how should look like a link when mouse is over it (yellow color)
    step 3 : as i wrote before, to make the tab behavior, i needed to place a div with a z-index higher range than the link (worldwide= language selection). but due to that, the link does not get the mouseover event and does not change its color to Yellow.
    step 4 : show the scrollbar only when the language selection div is displayed :-(

  6. #6
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    What browser are you using? IE will not take the pseudo-class for anything other than an anchor. I assume that they are anchor links.

    I don't know what you want with these images, but until we get right with:

    <div id='ID_DivTopMenu' class='Div_TopMenu'>

    .Div_TopMenu {...}, a problem remains. I see & note the class="" similar in name to this id, but there is no #ID_DivTopMenu in the CSS that I can see.
    I don't know what more can be done for you. The HTML cites a DIV named id="ID_DivTopMenu", -I don't think that there is anything in the CSS called "#ID_DivTopMenu" and maybe that is part of the problem..

    No live-hosting eh? Can you copy the ENTIRE code and past it into a post? The two segements that you showed aren't enough: -I re-built using them and see something entirely different than what your screenshot images show. Either we are using different browsers or user-agents (VERY likely.. -are you using Dreamweaver for this?), or, -there is some essential code not included (javascript probably, if this is a drop-down and we'd NEED that to see/test what you are doing and the code is quite ineffective without this)...
    What I see, is a 20-or-30px tall navigation bar, about 50px wide, that is chopped-off at the bottom, and nothing works at all..
    Last edited by WebJoel; 01-01-2008 at 11:22 AM.
    I build for: Firefox and tweak for IE

  7. #7
    Join Date
    Nov 2006
    Posts
    114
    you will not find any #something in my css file because i use for that class='something'.

    i use only id for javascript actions

    A.

  8. #8
    Join Date
    Nov 2006
    Posts
    114
    i finally found what it was... my main div in which all the rest of web page elements are stored, had overflow : auto. :-(

  9. #9
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    ok
    I build for: Firefox and tweak for IE

Thread Information

Users Browsing this Thread

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

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.18408 seconds
  • Memory Usage 2,923KB
  • Queries Executed 13 (?)
More Information
Template Usage (33):
  • (1)SHOWTHREAD
  • (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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (9)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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 (70):
  • 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_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_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