Modified Bootstrap dropdown

Size
2,534 Kb
Views
12,144

How do I make an modified bootstrap dropdown?

On small screens the dropdown menu acts as normal, but on larger screens dropdown elements are positioned side by side, but there is no double content!. What is a modified bootstrap dropdown? How do you make a modified bootstrap dropdown? This script and codes were developed by Henri Peetsmann on 09 December 2022, Friday.

Modified Bootstrap dropdown Previews

Modified Bootstrap dropdown - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Modified Bootstrap dropdown</title> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <h2>Modified Bootstrap dropdown</h2> <p>On small screens the dropdown menu acts as normal, but on larger screens dropdown elements are positioned side by side without double HTML. Resize the viewport to see the changes.</p> <hr /> <div class="dropdown inline-dropdown"> <span class="inline-dropdown-trigger" id="example" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a href="#">EE <i class="caret"></i></a> <span class="inline-dropdown-shield"></span> </span> <ul class="dropdown-menu" role="menu" aria-labelledby="example"> <li><a href="#">EN</a></li> <li><a href="#">RU</a></li> <li><a href="#">DE</a></li> </ul> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Modified Bootstrap dropdown - Script Codes CSS Codes

/* Using Bootstrap 3.3.4 //maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css */
.container { max-width: 750px;
}
/* Inline Dropdown */
.inline-dropdown .dropdown-menu { min-width: 0; padding: 0; margin: 0; border: none; border-radius: 0; background-color: transparent;
}
@media(min-width: 768px){ .inline-dropdown .dropdown-menu { position: static; display: inline-block; float: none; -webkit-box-shadow: none; box-shadow: none; }
}
@media(min-width: 768px){ .inline-dropdown .dropdown-menu li { display: inline-block; }
}
/* Dropdown elements */
.inline-dropdown .inline-dropdown-trigger { position: relative; display: inline-block;
}
.inline-dropdown .inline-dropdown-trigger a,
.inline-dropdown .dropdown-menu a { display: inline-block; width: 60px; height: 60px; line-height: 60px; padding: 0; text-align: center; text-decoration: none; color: #333; text-decoration: none; background: #ddd;
}
.inline-dropdown .dropdown-menu a { border-top: solid 1px #ccc;
}
.inline-dropdown .inline-dropdown-trigger a:focus,
.inline-dropdown .inline-dropdown-trigger a:hover,
.inline-dropdown .dropdown-menu a:focus,
.inline-dropdown .dropdown-menu a:hover { color: white; background: indigo;
}
@media(min-width: 768px){ .inline-dropdown .inline-dropdown-trigger a, .inline-dropdown .dropdown-menu a { width: 50px; height: auto; padding-top: 5px; padding-bottom: 5px; border: none; line-height: 1.5; }
}
/* Disable link & caret */
.inline-dropdown .inline-dropdown-shield { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; cursor: pointer;
}
@media(min-width: 768px){ .inline-dropdown .inline-dropdown-shield, .inline-dropdown .inline-dropdown-trigger .caret { display: none; }
}

Modified Bootstrap dropdown - Script Codes JS Codes

// Using jQuery and Bootstrap 3.3.4
Modified Bootstrap dropdown - Script Codes
Modified Bootstrap dropdown - Script Codes
Home Page Home
Developer Henri Peetsmann
Username henripeetsmann
Uploaded December 09, 2022
Rating 3
Size 2,534 Kb
Views 12,144
Do you need developer help for Modified Bootstrap dropdown?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Henri Peetsmann (henripeetsmann) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!