/    Sign up×
Community /Pin to ProfileBookmark

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.

to post a comment
CSS

8 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelDec 30.2007 — 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 [I]include[/I] 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)
Copy linkTweet thisAlerts:
@alainauthorDec 30.2007 — 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>
[/QUOTE]


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;

}
[/QUOTE]
Copy linkTweet thisAlerts:
@WebJoelDec 31.2007 — 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" [I]and[/I] 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 [I]name the id[/I], 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 [B][COLOR="Red"][U]id[/U][/COLOR]='ID_DivTopMenu'[/B] class='Div_TopMenu'>

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

[B][U][COLOR="Red"].[/COLOR][/U]Div[U][COLOR="Red"]_[/COLOR][/U]TopMenu[/B]

{height : 20px;

margin:0 5px;

color : #5078b4;

vertical-align : bottom;

}[/QUOTE]
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..
Copy linkTweet thisAlerts:
@alainauthorJan 01.2008 — 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 :-(

[upl-file uuid=1bacec0b-dc6f-4628-a557-8779485925a9 size=2kB]step1---no-mouse-on-it.png[/upl-file]

[upl-file uuid=f2eea34f-252d-4477-b910-2717eb0feaee size=2kB]step2---mouse-on-link.png[/upl-file]

[upl-file uuid=b7a2d0d5-ac95-4047-8f73-8f77a71e6463 size=3kB]step3---mouse-on-language-link.png[/upl-file]

[upl-file uuid=693eaa3a-7eef-4b20-97d7-4d3298806af1 size=13kB]step4---scrollbar.png[/upl-file]
Copy linkTweet thisAlerts:
@WebJoelJan 01.2008 — 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 [COLOR="Red"]id='ID_DivTopMenu'[/COLOR] class='Div_TopMenu'>

[COLOR="Red"].Div_TopMenu[/COLOR] {...}, a problem remains. I see & note the class="" similar in name to this id, but there is no [I]#ID_DivTopMenu[/I] 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 "[B][SIZE="4"]#[/SIZE][/B]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 [I]entirely different[/I] than what your screenshot images show. Either we are using different browsers or user-agents ([I]VERY[/I] 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)... :p

What I see, is a 20-or-30px tall navigation bar, about 50px wide, that is chopped-off at the bottom, and [I]nothing[/I] works at all.. :o
Copy linkTweet thisAlerts:
@alainauthorJan 01.2008 — 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.
Copy linkTweet thisAlerts:
@alainauthorJan 01.2008 — i finally found what it was... my main div in which all the rest of web page elements are stored, had overflow : auto. :-(
Copy linkTweet thisAlerts:
@WebJoelJan 01.2008 — ok
×

Success!

Help @alain spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...