-
AuthorPosts
-
September 27, 2016 at 12:52 am #692026
Hi,
we would like to add a button with a dropdown overlay that gives the user two option to purchase a product (each option would open a URL)
something like pictured below, the full-width sub menu item doesnt let us do that, and we need to add it to a column
September 27, 2016 at 9:31 am #692095Hey kilimats,
Please create a regular menu with submenu items linked directly to the products.
get back to us and we can help you style the parent item and submenu dropdown items to look similar to the above screenshot.
Best regards,
VinaySeptember 27, 2016 at 9:35 am #692100let me clarify, we need the button to be located in the page within a column, not a menu in the header. if what you said meet this requirement, can you advise how you create that menu because the only option we saw is the fullwidth sub menu option in the advance layout, and this wont fit into a column into a page.
should i be using a plugin maybe?
September 27, 2016 at 9:20 pm #692410Hi,
Ok, in that case please create a new widget area in Appearance > widgets and use the widget area element in the advanced layout builder. You can then display the menu anywhere on the layout.
Please check the link in private add the html in the widget area and the css in your quick css or child theme styles.
Best regards,
VinaySeptember 6, 2017 at 5:49 am #848443This reply has been marked as private.September 9, 2017 at 3:23 am #849796Hi,
The html and css can be found in this codepen link.
// https://codepen.io/Idered/pen/vowrB
Best regards,
IsmaelOctober 31, 2019 at 11:05 pm #1152891Hi,
I’m also trying to implement this but using a new menu set as a button in a widget area within my page doesn’t display a button – it just shows the links like in a regular menu. I’ve tried using the HTML/CSS from the codepen link above and that doesn’t display correctly either (although I seem to be missing some steps that were sent privately to the OP?).
I just need an easy way to create a dropdown menu from a button that is placed within a column on my page (I’m using advanced layout). Please can you advise?
Thanks,
MattNovember 1, 2019 at 1:30 pm #1153026Hi,
@meanster99: Did you add the css code, then toggle the Performance > File Compression settings afterwards? Please create a new thread and provide a direct link to the page where the dropdown menu is located.Best regards,
IsmaelNovember 4, 2019 at 11:17 pm #1153787Hi Ismael,
So just to clarify, following the posts I’ve found on this forum there appear to be two ways to achieve what I am trying to:
1. Adding a new menu that uses a button style (coloured or bordered) and then adding that as a widget in the layout builder in the column I want it to appear – it doesn’t appear as a button, it just appears as a conventional text menu list.
2. Use the codepen HTML/CSS – this kind of works for me but the styling is wrong and I can’t get the width of the button to change (even using !important, clearing cache etc, and the actual text of the dropdown isn’t visible, even though the color is set to black (it only becomes visible once clicked on).I’ve tried toggling the performance as you suggested, but it still isn’t working.
I’ve added both methods to a test page that you can have a look at (added to private content) to see exactly what I mean.
Cheers,
MattNovember 6, 2019 at 12:31 pm #1154255I am looking for the same functionality :) Looking forward to suggestions for solution.
November 9, 2019 at 7:56 pm #1155235Hi,
Sorry for the late reply, the css on the CodePen page had to be adjusted because it didn’t account for other css included on the page with a higher specificity. I have combined the html and the css to be used within a code block element, just copy all of this code and add to a code block element and it should work fine.<style> .dropdown { position: relative; display: inline-block; text-align: left; width: 132px; } .dropdown-text { cursor: pointer; position: absolute; text-indent: 10px; line-height: 32px; background-color: #eee; border: 1px solid #ccc; border-radius: 3px; box-shadow: 0 1px 0 rgba(255,255,255, .9) inset, 0 1px 3px rgba(0,0,0, .1); width: 100%; color: #333; } .dropdown-text:after { position: absolute; right: 6px; top: 15px; content: ''; width: 0px; height: 0px; border-style: solid; border-width: 5px 4px 0 4px; border-color: #555 transparent transparent transparent; color: #333; } .dropdown-text, #top #main ul.dropdown-content a { color: #333; text-shadow: 0 1px #fff; } #top #main input.dropdown-toggle[type='text'] { font-size: 0; z-index: 1; cursor: pointer; position: absolute; top: 0; border: none; padding: 0; margin: 0 0 0 1px; background: transparent; text-indent: -10px; height: 34px; width: 100%; color: #333; } #top #main input.dropdown-toggle[type='text']:focus { outline: 0; } #top #main ul.dropdown-content { -webkit-transition: all .25s ease; -moz-transition: all .25s ease; -ms-transition: all .25s ease; -o-transition: all .25s ease; transition: all .25s ease; list-style-type: none; position: absolute; top: 32px; padding: 0; margin: 0; opacity: 0; visibility:hidden; border-radius: 3px; text-indent: 10px; line-height: 32px; background-color: #eee; border: 1px solid #ccc; width: 140px; } #top #main ul.dropdown-content a { display: block; text-decoration: none; } #top #main ul.dropdown-content a:hover { background: #e8e8e8; } #top #main input.dropdown-toggle[type='text']:hover ~ .dropdown-text, #top #main input.dropdown-toggle[type='text']:focus ~ .dropdown-text { background-color: #e8e8e8; } #top #main input.dropdown-toggle[type='text']:focus ~ .dropdown-text { box-shadow: 0 1px 3px rgba(0,0,0, .2) inset, 0 1px 0 rgba(255,255,255, 0.8); z-index: 2; } #top #main input.dropdown-toggle[type='text']:focus ~ .dropdown-text:after { border-width: 0 4px 5px 4px; border-color: transparent transparent #555 transparent; } #top #main ul.dropdown-content:hover, #top #main input.dropdown-toggle[type='text']:focus ~ .dropdown-content { opacity: 1; visibility:visible; top: 42px; } </style> <p><i>To show/hide menu, I'm using :focus instead of checkbox so when you click somewhere else then menu will be hidden :).</i></p> <div class="dropdown"> <input class="dropdown-toggle" type="text"> <div class="dropdown-text">Account</div> <ul class="dropdown-content"> <li><a href="#">Settings</a></li> <li><a href="#">Projects</a></li> <li><a href="#">Log out</a></li> </ul> </div>
Best regards,
MikeFebruary 10, 2020 at 11:24 pm #1183299Hi Mike,
Thanks for the snippet of code. I think this will be better to use than the ajax drop down menu we’re using now (which is not redirecting at all in safari and chrome) after the latest update (can’t tell if it’s enfold, wordpress, etc.) But the simple html drop down should be much better.The only problems we’re having is with the drop down menu overlay on other avia page builder elements. (see private area for screenshot). The links within the drop down menu work until they’re overlapping the content element below. And what would be the update to the code to have the drop down menu have a drop shadow and a background / font color change on mouse hover?
Thank you for your help!
EricFebruary 12, 2020 at 5:18 am #1183746Hi,
@Eric: Where can we see the issue? The dropdown in the contact page/s (see private field) looks fine. Please provide a direct link to the page displaying the issue.
Best regards,
IsmaelFebruary 12, 2020 at 9:18 pm #1183995Hi Ismael,
Reviewing the two in page drop down menu options, the ajax method we currently have is a better UX on mobile. The problem that we’re having which may or may not be related to the latest Enfold update, is that the menu links are not working in Safari and Chrome. Yet in Firefox they’re working fine. The location is below.
Thanks!
EricFebruary 13, 2020 at 1:31 pm #1184127Hi,
Thanks for the login, but I see that you have 3 errorsUncaught SyntaxError: Unexpected token '<'
it looks like line brakes in your scripts<br />
Please see the screenshot in Private Content area.Best regards,
MikeFebruary 13, 2020 at 4:59 pm #1184213Thanks Mike. Will check that out. Btw I’m unable to view any private content. I’m logged in to your support forum but am only able to reply in the private area and view my own private area posts, not yours or Ismaels (moderators). Thanks!
February 14, 2020 at 12:38 pm #1184467 -
AuthorPosts
- You must be logged in to reply to this topic.