Phone: div goes taller than viewport -- don't see a scrollbar

hi,

this is somewhat related to this topic, but not quite…:wink:

problem is only with phones, due to the small dimensions of the screen…

I have a div that I place, thru user input, when they click on a link (classic show/hide thingie) on top of a foto… I had asked in above-mentioned topic about seeing/not seeing a scrollbar…

well now, it turns out in the phone – at least on iOS Simulator in my mac – I don’t see a scroll bar at all for the div I place on top of photo, which consists just of plain text…and the div ends below where viewport ends… I don’t see it if I try to scroll either… what is solution here please… I would appreciate it… have attached screenshot, which I took from iOS Simulator phone… and here is CSS:

#photo_main { width:80%; padding:5px 0; margin:0 auto; position:relative;  } 
#info { position:absolute; width:100%;  overflow:auto; }

(same thing if I chg to overflow:scroll, as was suggested in above-mentioned topic…)

thank you…

I’m not aware there are scrollbars on a phone. You just swipe the content up.

well, when try to “swipe up” nothing happens (at least in iOS Simulator phone…)

thank you…

Are you sure there’s no overflow:hidden on any of the other page elements, such as the body or another containing div?

Probably a silly question, but is the screen on the Mac on which you have opened the simulator a touch screen? or does the simulator have “swipe” simulation buttons?

Is there some reason that you cannot set up a demonstration site or post a “working page” that demonstrates the problem? If one of the Mac users can see the full code, they can probably identify the problem straight away and avoid a lot of guessing.

1 Like

thank you all for your responses… well, I think I have to try on a real phone… the real simulator does not do it…
I’m in an unusual situation, I don’t have webhosting as of yet (will have in a few weeks…) so I can’t post a page anywhere…

the simulator is on my MacBook Pro… (so no touch screen…) you can swipe fine for most situations… (in fact for nav’ing from photo to photo I use jquery.touchSwipe plugin… and it works great on the simulator (it even works on the Chrome simulator… instead of the cursor (hand) you get like a round little thing, and you imitate the swiping action on the mouse (touchpad) and it works fine…)

when I have just the photo loaded and the photo is taller than viewport (usu. the phone/landscape situation) I can swipe fine to get to bottom of photo… it’s only when I have this div loaded on top of the photo that it doesn’t let me swipe to the bottom of it (I suspect b/c it’s positioned absolutely, but am not sure…)

and no, I have no overflow:hidden set for any element…

but again, I really think I have to test on a real phone… so I think I have to drop this for now… will revisit (and possibly link/refer to this topic if, once I start testing on phones this problem persists… still would welcome suggestions for now if anyone can think of any…:wink:

thank you all very much…

You can always post a demo on something like CodePen that people can test.

1 Like

If it’s the real iOS simulator then it will be 99 .9% accurate so you will most likely have the same issue on a real device.

It’s probably something simple like an element or overlay stopping you from getting to the element you want to move but without a demo it will be hard to help.

SOLVED – had overflow:auto in top-level div#wrapper, that wraps all my content… don’t remember why I put that there, but now I removed and it solved the problem… now it works fine in iOS Simulator phone, can swipe up to see the content…

(ony one prob: for portrait phone have social media links on a div across the bottom, set position:fixed, but when I swipe up this div doesn’t stay fixed at the bottom, it moves up… oh brother…:open_mouth: )

thank you all very much for your responses…

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.