PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Jul 21, 2017 1:36 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Oct 27, 2016 5:47 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4231
Location: United Kingdom
Hi

We have a row of floating divs. When you hover over them, their respective dropdown menu shows. Perfect.
When it's down to a mobile width, the DIVs tile (so they don't take up too much vertical real-estate), but when you tap on them the 'dropdowns' go outside of the page width, causing the page to expand on a phone, and shrinking the page (to fit it all in the screen).

So my question is... is it possible to set the dropdown DIV to be full width of the screen, directly below it's parent DIV?

I have attached an example of what it is doing, and what I want it to do.
I'm using position: relative for each div and position: absolute for the dropdowns.


Attachments:
File comment: Example of the issue and preference
ss.jpg
ss.jpg [ 27.43 KiB | Viewed 1656 times ]

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Top
 Profile  
 
PostPosted: Thu Oct 27, 2016 6:11 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4231
Location: United Kingdom
Answered my own question yet again.
In the Dropdown DIV that is display: none, add this line:
left: 0px;
And set width to be 100%.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group