/    Sign up×
Community /Pin to ProfileBookmark

top <div> not receiving scroll event

hello;

I have two divs: div_1 with an <img> and div_2 with a <p> inside;

div_2 is set to overflow:scroll; however unless the mouse is over the text the div_2 does not receive the scroll event;

in mozilla the div_2 does receive the scroll event at all (unless you use the scroll track to drag)

[code]
<body >
<div id=”div_1″
style=”position:absolute;
top:0px; left:0px;
width:95% ; height:95%; ” >
<img id=”div_1_img”
src=”some.jpg”
style=”position:relative;
width:100% ; height:100%; “/>
</div>
<div id=”div_2”
style=”position:absolute;
width:50%; height:28%;
left: 14%; top: 28%;
overflow:auto; “>
<p id=”div_2_p”
style=”position:absolute;
width:90%; height:90%
left: 5%; “>
sehhb hathh rhrhnrnsnethsrthsrths rthsr thsrthrst hsrn srnsrnr nrf
sehh bhathhrh rhnrnsne thsrthsr thsr ths rthsrthr sthsrns rnsrnnrf
sehhbhathhrhrhnr snethsrt hsrthsr thsrth srthrsthsrnsrn srnrnrf
sehh bhathh rhrhn rnsnet hsrthsrth srthsrt hsrthrsth srnsrnsr nrnrf<br/><br/>
sehhbhathhr hrhn rnsn eth srthsrthsrthsrt hsrt hrsth srns rnsrnr nrf
sehh bhathh rhrhnrnsnethsrt hsrth srthsr ths rthr sthsrns rnsrnrnrf
sehhbha thhrhrhnrn snethsr thsrthsrth srthsrthrst hsrnsr nsrnrnrf
sehh bhathh rhrhn rnsnet hsrthsrth srthsrt hsrthrsth srnsrnsr nrnrf<br/><br/>
sehhbhathhr hrhn rnsn eth srthsrthsrthsrt hsrt hrsth srns rnsrnr nrf
sehh bhathh rhrhnrnsnethsrt hsrth srthsr ths rthr sthsrns rnsrnrnrf
sehhbha thhrhrhnrn snethsr thsrthsrth srthsrthrst hsrnsr nsrnrnrf
sehh bhathh rhrhn rnsnet hsrthsrth srthsrt hsrthrsth srnsrnsr nrnrf<br/><br/>
sehhbhathhr hrhn rnsn eth srthsrthsrthsrt hsrt hrsth srns rnsrnr nrf
sehh bhathh rhrhnrnsnethsrt hsrth srthsr ths rthr sthsrns rnsrnrnrf
sehhbha thhrhrhnrn snethsr thsrthsrth srthsrthrst hsrnsr nsrnrnrf
sehh bhathh rhrhn rnsnet hsrthsrth srthsrt hsrthrsth srnsrnsr nrnrf<br/><br/>
</p>
</div>

</body>
[/code]

ofcourse if I set the div_2 background to some color it will work;

any thoughts otherwise;

thanks
Shannon Burnett

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@dsdsdsdsdauthorNov 23.2004 — I have found a solution to my problem;
<i>
</i>&lt;div id="div_2" style=" ... ; background:url(some.jpg) fixed no-repeat 0px 1000000px; ... ;"&gt;
×

Success!

Help @dsdsdsdsd 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.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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