Modified Bootstrap dropdown
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 - 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
Developer | Henri Peetsmann |
Username | henripeetsmann |
Uploaded | December 09, 2022 |
Rating | 3 |
Size | 2,534 Kb |
Views | 12,144 |
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!
Name | Size |
Centre aligned responsive header | 2,493 Kb |
A Pen by Henri Peetsmann | 3,559 Kb |
Responsive Moto G mockup | 3,415 Kb |
Responsive MacBook retina mockup | 3,228 Kb |
Sprite animation experiment | 1,638 Kb |
Price ribbon | 2,089 Kb |
Sponsor logos | 3,285 Kb |
Responsive SVG cross-browser | 2,078 Kb |
Search box | 2,434 Kb |
Dynamic ring loader | 3,331 Kb |
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!
Name | Username | Size |
Simple Weather App | Cmwebby | 0 Kb |
Flex Table | Simeonoff | 4,059 Kb |
Disable JavaScript execution from console | Ludviglindblom | 2,534 Kb |
A Pen by Alex Edwards | Exards | 8,218 Kb |
A Pen by Paul Sullivan | Pwsm50 | 2,349 Kb |
Comment Jquery | SquishyAndroid | 2,421 Kb |
Polygon Dodecahedron in CSS | Vennsoh | 7,606 Kb |
Rotate Demo | Agelber | 3,061 Kb |
Material Design-Layout-Principles Practice | Fraina | 2,331 Kb |
Atom | Bhlaird | 1,932 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!