Unverified

Name

Dropdown Button Links

Language

HTML

Rating

Voted: 0 by 0 user(s)

Codevault

WebSquadron

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.4

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

14/06/2024

Important Note

This snippet has the following status:

Unverified

This snippet has not been verified, use with caution and at your own risk. See details provided by author in sidebar and click below to find out more.

Dropdown Button Links

 
                    
1<div class="custom-dropdown-container">
2 <select class="custom-dropdown" onchange="location = this.value;">
3 <option value="https://learn.websquadron.co.uk" selected>Option A</option>
4 <option value="https://learn.websquadron.co.uk/#packs">Option B</option>
5 <option value="https://learn.websquadron.co.uk/#taster">Option C</option>
6 </select>
7</div>
8 
9<style>
10 .custom-dropdown-container {
11 display: inline-block;
12 position: relative; /* For positioning the pseudo-element */
13 }
14 
15 .custom-dropdown {
16 background-color: #000;
17 color: #FFF;
18 border: 1px solid #FFF;
19 font-weight: 600;
20 border-radius: 50px;
21 padding: 10px 10px 10px 16px; /* T, R, B, L */
22 cursor: pointer;
23 -webkit-appearance: none;
24 -moz-appearance: none;
25 appearance: none;
26 width: 220px; /* Adjust width as needed */
27 }
28 
29 .custom-dropdown-container::after {
30 content: '\25BC'; /* Unicode character for dropdown arrow */
31 color: #FFF;
32 position: absolute;
33 right: 20px; /* Adjust space to the right of the dropdown icon */
34 top: 50%;
35 transform: translateY(-50%);
36 pointer-events: none;
37 }
38 
39 .custom-dropdown option {
40 background-color: #000 !important;
41 color: #FFF;
42 font-weight: 600;
43 }
44 
45</style>

0

Related Snippets

Please see some snippets below related to this snippet..

General

AI Verified

2

Remove Protected Title

Added: 2 months ago

Last Updated: 2 weeks ago

General

AI Verified

0

Shortcode for user first and last name

Added: 1 year ago

Last Updated: 1 year ago

Display current user display name with shortcode

General

AI Verified

0

Clear navigation classes

Added: 1 year ago

Last Updated: 1 year ago

Remove classes and ids from li in navigation

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Performance

AI Verified

32

Remove Unused Javascript

Added: 1 year ago

Last Updated: 3 days ago

Remove Unused Javascript - and improve your Page Speed Insight Score

WooCommerce

Pro Verified

10

Deactivate some WooCommerce Checkout Fields

Added: 1 year ago

Last Updated: 2 weeks ago

Deactivate some WooCommerce Checkout Fields from showing

Elementor

AI Verified

6

CSS Grid Aid

Added: 8 months ago

Last Updated: 1 month ago

This can be used for any WordPress Builder to aid working with CSS Grids.