Jump to content
AblazeRich

CSS Div in dropdown not displaying correctly

Recommended Posts

Hi All,

I've been asked to do some work on a pretty archaic legacy website, that is a mash up of lots of different languages, coding styles and hacks put in by different people over the years.

http://spldev.sanpancholife.com

The website was made (badly) responsive and some parts aren't working well, especially the sub menus in the drop down menus. 

I am trying to fix this without doing a total CSS overhaul. So far I've managed to achieve a lot of success with getting it to display ok on mobile sized screens.

BUT I have two problems. 

One when you click on Vacation Rentals, the quick search box (and the pop up date picker within it) display badly with part of the left hand side disappearing off the side of the screen. I've been trying to figure this out and I just can't see whats doing that. Any ideas?

 

The other issue is that the dropdowns don't disappear unless you click a second time on the dropdown header. This gets confusing as the dropdowns end up layering up if you don't close them.

 

Both these issues refer to the mobile screen sizes.

 

Thanks in advance for the advice Guys!

Rich

Share this post


Link to post
Share on other sites

What would be an easy way to make a DIV disappear when another button is clicked on in the drop down menu system?

It uses ul and li structure, although its also has container DIVS and things...

Thanks

Share this post


Link to post
Share on other sites
15 hours ago, AblazeRich said:

What would be an easy way to make a DIV disappear when another button is clicked on in the drop down menu system?

It uses ul and li structure, although its also has container DIVS and things...

Thanks

Give all the DIVs an identical class. On click, use JavaScript to toggle a hidden class on all DIVs with the same class, to hide all the DIVs. Then build in an exception that doesn't add the hidden class to the DIV that fired the event - i.e. the one that was clicked. 

Edited by Fee

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
      59,131
    • Most Online
      4,970

    Newest Member
    Kho Sàn Gỗ
    Joined
  • Forum Statistics

    • Total Topics
      65,989
    • Total Posts
      454,479
×