{"id":21003,"date":"2020-08-07T22:53:09","date_gmt":"2020-08-08T05:53:09","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=21003"},"modified":"2020-12-29T11:01:41","modified_gmt":"2020-12-29T19:01:41","slug":"bootstrap-dropdown","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/","title":{"rendered":"How to Make a Dropdown Menu with Bootstrap"},"content":{"rendered":"\n<p>No matter if you\u2019re making a simple one page portfolio website, a monolithic app for a huge company, a blog, or a forum, chances are you\u2019re going to need a dropdown menu.<br><\/p>\n\n\n\n<p>A dropdown menu is especially useful when you have lots of links or actions, but not enough space on the page to display them all at once.<br><\/p>\n\n\n\n<p>Usually, dropdowns require a bit of JavaScript.<br><\/p>\n\n\n\n<p>If you haven\u2019t started learning it yet or just want a quick solution, Bootstrap is the perfect fit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Bootstrap?<\/h2>\n\n\n\n<p>You\u2019ve probably heard the word thrown around lots of times, but what is Bootstrap?<br><\/p>\n\n\n\n<p>It\u2019s a front-end CSS (with a bit of JavaScript) framework. This means that it\u2019s a kind of scaffolding made beforehand to speed up development considerably. Programmers commit a certain amount of time to develop a standard to which to hold up to, and include all the prerequisite setup necessary into the framework itself, so we don\u2019t have to do it each time.<br><\/p>\n\n\n\n<p>A standardized styling is applied to certain components in Bootstrap that are often built, like button elements, button groups, and navigation bars. This means that we can apply all those styles using a few predefined keywords instead of writing numerous lines of code repeatedly.&nbsp;<br><\/p>\n\n\n\n<p>This helps a lot with consistency as a team of multiple developers working on larger applications don\u2019t need to worry about applying the same styles. All styles are defined in the framework.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up Bootstrap<\/h2>\n\n\n\n<p>To use Bootstrap, we need to add a few lines of code to our HTML structure.<br><\/p>\n\n\n\n<p>We\u2019re going to use the Bootstrap CDN for the fastest and simplest setup.<br><\/p>\n\n\n\n<p>First of all, we need a proper HTML5 template, which is easily done in modern code editors. In VSCode, simply type ! and press enter or tab to get the HTML5 document structure which looks like this:&nbsp;<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;en&quot;&gt;\n&lt;head&gt;\n  &lt;meta charset=&quot;UTF-8&quot;&gt;\n  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;\n  &lt;title&gt;Document&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  \n&lt;\/body&gt;\n&lt;\/html&gt;<\/pre><\/div>\n\n\n\n<p>Now, inside of the &lt;head&gt; tag, paste the following lines above any other stylesheets:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;link\n      rel=&quot;stylesheet&quot;\n      href=&quot;https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.0\/css\/bootstrap.min.css&quot;\n      integrity=&quot;sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk&quot;\n      crossorigin=&quot;anonymous&quot;\n    \/&gt;<\/pre><\/div>\n\n\n\n<p>Bootstrap depends on some JavaScript libraries under the hood, so we also need to include the following &lt;script&gt; tags right before the closing &lt;\/body&gt; tag:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;script\n      src=&quot;https:\/\/code.jquery.com\/jquery-3.5.1.slim.min.js&quot;\n      integrity=&quot;sha384-DfXdz2htPH0lsSSs5nCTpuj\/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj&quot;\n      crossorigin=&quot;anonymous&quot;\n    &gt;&lt;\/script&gt;\n    &lt;script\n      src=&quot;https:\/\/cdn.jsdelivr.net\/npm\/popper.js@1.16.0\/dist\/umd\/popper.min.js&quot;\n      integrity=&quot;sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo&quot;\n      crossorigin=&quot;anonymous&quot;\n    &gt;&lt;\/script&gt;\n    &lt;script\n      src=&quot;https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.0\/js\/bootstrap.min.js&quot;\n      integrity=&quot;sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh\/kR0JKI&quot;\n      crossorigin=&quot;anonymous&quot;\n    &gt;&lt;\/script&gt;<\/pre><\/div>\n\n\n\n<p>That\u2019s all the setup we need. We\u2019re now ready to bootstrap our project.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Utilising Bootstrap<\/h2>\n\n\n\n<p>The power of Bootstrap is utilised by using it\u2019s keywords as classes of HTML tags. By using it, you can style your page completely without even making a CSS file!<br><\/p>\n\n\n\n<p>For instance, here\u2019s a simple button group:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;btn-group&quot;&gt;\n        &lt;button class=&quot;btn btn-primary&quot;&gt;button 1&lt;\/button&gt;\n        &lt;button class=&quot;btn btn-secondary&quot;&gt;button 2&lt;\/button&gt;\n        &lt;button class=&quot;btn btn-info&quot;&gt;button 3&lt;\/button&gt;\n        &lt;button class=&quot;btn btn-success&quot;&gt;button 4&lt;\/button&gt;\n        &lt;button class=&quot;btn btn-danger&quot;&gt;button 5&lt;\/button&gt;\n        &lt;button class=&quot;btn btn-light&quot;&gt;button 6&lt;\/button&gt;\n        &lt;button class=&quot;btn btn-dark&quot;&gt;button 7&lt;\/button&gt;\n        &lt;button class=&quot;btn btn-white&quot;&gt;button 8&lt;\/button&gt;\n        &lt;button class=&quot;btn btn-warning&quot;&gt;button 9&lt;\/button&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<p>And the outcome:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/_Zfj_jTQYbq8vOI6hLA1aUs60WdEwX--xT0M89G-d1svpW6NvMSZdnoDebe_yZqUTnc3GZbiDE0365azBUzu2zjfkdIegNRieaVUFZsr2ZaTR5CJPw6vLOKNSB5gB1GKlOVE0i9O\" alt=\"\"\/><\/figure>\n\n\n\n<p>We\u2019ve made a button group with all of Bootstrap\u2019s preset colors (muted excluded as it\u2019s reserved for text).<br><\/p>\n\n\n\n<p>Now let\u2019s get on to dropdowns.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bootstrap Dropdowns, Various Ways<\/h2>\n\n\n\n<p>In older versions of Bootstrap, we had to use &lt;a&gt; tags exclusively for dropdowns. Since version 4 &lt;button&gt; tags are accepted as well.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">A note on links and buttons:&nbsp;<\/h5>\n\n\n\n<p>Links should be used for navigation purposes only. Whether within the current page, or to send the user to a different page, but a link\u2019s only function should be navigation.&nbsp;<br><\/p>\n\n\n\n<p>On the other hand, any kind of action like log in, sign up, submit form, hide section, change color theme etc. should be handled with buttons.&nbsp;<br><\/p>\n\n\n\n<p>Any sort of JavaScript click-related actions should be done with buttons.<br><\/p>\n\n\n\n<p>Also, links can only be accessed with the enter key, whereas buttons can be accessed with enter or space which is important to take into account for accessibility purposes.<br><\/p>\n\n\n\n<p>In any case, the data-toggle=&#8221;dropdown&#8221;&nbsp;<\/p>\n\n\n\n<p>attribute is necessary in order for it to work.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Dropdown with Buttons<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropdown&quot;&gt;\n        &lt;button class=&quot;btn dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;\n          Button menu\n        &lt;\/button&gt;\n        &lt;div class=&quot;dropdown-menu&quot;&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;This dropdown&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Uses&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Buttons&lt;\/a&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<p>We wrap the whole thing in an element (most usually a &lt;div&gt;) with class=\u201cdropdown\u201d, and make a button with class=\u201cbtn dropdown-toggle\u201d and data-toggle=\u201cdropdown\u201d as the first element. This will act as the toggle for the dropdown menu.&nbsp;<br><\/p>\n\n\n\n<p>Then, we make a container for the actual dropdown, again most usually a &lt;div&gt; or &lt;ul&gt; is used, with class=\u201cdropdown-menu\u201d.&nbsp;<br><\/p>\n\n\n\n<p>Lastly, we make all the items that we want inside of the menu with class=\u201cdropdown-item\u201d. These are usually links to other pages or sections on the current page.<br><\/p>\n\n\n\n<p>The result:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/8HflHvqQuhprXFNhu-FntS2JwusLpsWEUWvBn0Xz_OAytnh3NPTkybbRKtC72RQ4eyJMCNhy0HQCGAX1JuQdB5N98Em92YnaX1PAkBYazYeTOTRTu0xFPQddv4L8MFTIrEO6KYGU\" alt=\"\"\/><\/figure>\n\n\n\n<p>Hooray, you\u2019ve made your first dropdown menu with Bootstrap!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Dropdown with Links<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropdown&quot;&gt;\n        &lt;a class=&quot;btn dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;\n          Link menu\n        &lt;\/a&gt;\n        &lt;ul class=&quot;dropdown-menu&quot;&gt;\n          &lt;a class=&quot;dropdown-item&quot; href=&quot;#&quot;&gt;This dropdown&lt;\/a&gt;\n          &lt;a class=&quot;dropdown-item&quot; href=&quot;#&quot;&gt;Uses&lt;\/a&gt;\n          &lt;a class=&quot;dropdown-item&quot; href=&quot;#&quot;&gt;Links&lt;\/a&gt;\n        &lt;\/ul&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<p>The exact same thing can be done using &lt;a&gt; tags. We also used &lt;ul&gt; this time for the menu, and the results are the same.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/oXBgqtUxEvqAOj_VRwll_AKK5avwyilbU-WE5fhCx3FyUjMzTNyFMVf9L6EqLqR8y5WkbPLyf8eSe1DoB0xaswaKWu69wYyAXF8Fx7NKkjbnJUbLsjHxP-F-lUN2Yc9q0uFiWz1V\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Styling a Menu and It\u2019s Items<\/h3>\n\n\n\n<p>Bootstrap styles can be added to the menu and items. Let\u2019s add some colors to our menu. We can do this by prefixing one of Bootstrap\u2019s colors with bg- which stands for background:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropdown&quot;&gt;\n        &lt;a class=&quot;btn btn-danger dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;\n          Styled menu\n        &lt;\/a&gt;\n        &lt;div class=&quot;dropdown-menu&quot;&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item bg-primary&quot;&gt;This is a&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item bg-warning&quot;&gt;Styled&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item bg-success&quot;&gt;Dropdown&lt;\/a&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<p>Which results in:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/C0wi2UY6XGzsxnwvg9-5_drCKxPow53TD7Tdco9NKdB9W91pm-TTjT84K3AVToacoSfwcKi4bpPx0pc0R5TqJ7EAdUPUiSOR2mxjz68gr-EbxZTS5NQN-s97CQVTehADVtVDKQd7\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Split Button Dropdown<\/h3>\n\n\n\n<p>Another interesting option is to have a split button. With this we get double functionality. A button to serve one purpose, and the caret to access the dropdown. A potential use case is to have the button open a page containing all the items from the menu, and the individual links leading to their own separate pages:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropdown&quot;&gt;\n        &lt;div class=&quot;btn-group&quot;&gt;\n          &lt;a href=&quot;#&quot; class=&quot;btn btn-danger&quot;&gt;All Menu Items&lt;\/a&gt;\n          &lt;a\n            class=&quot;btn btn-danger dropdown-toggle dropdown-toggle-split&quot;\n            data-toggle=&quot;dropdown&quot;\n          &gt;&lt;\/a&gt;\n          &lt;div class=&quot;dropdown-menu&quot;&gt;\n            &lt;a href=&quot;#&quot; class=&quot;dropdown-item bg-primary&quot;&gt;Item #1&lt;\/a&gt;\n            &lt;a href=&quot;#&quot; class=&quot;dropdown-item bg-warning&quot;&gt;Item #2&lt;\/a&gt;\n            &lt;a href=&quot;#&quot; class=&quot;dropdown-item bg-success&quot;&gt;Item #3&lt;\/a&gt;\n          &lt;\/div&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<p>In this case, we need to make a container with class=\u201cbtn-group\u201d to wrap the button and the toggle, and add dropdown-toggle-split to the toggle button.<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/nY4Ti9aPkd-frfQ06gA2q4bx2yvV-UzUz5k3lYGx848XGJ5xTjThmCZKCI6B8P-6DJyutuW_qLJY0V1Tk-3FaIa7VA2Vw5szw9MkKEq-pIh3foYQM7GcitmvTJdg5j7yGTYTWcrH\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Form inside a Dropdown<\/h3>\n\n\n\n<p>We can also place an HTML form inside a dropdown menu:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropdown&quot; data-toggle=&quot;dropdown&quot;&gt;\n          &lt;button class=&quot;dropdown-toggle btn-danger btn&quot;&gt;Dropdown Form&lt;\/button&gt;\n          &lt;div class=&quot;dropdown-menu&quot;&gt;\n            &lt;form&gt;\n              &lt;div class=&quot;form-group&quot;&gt;\n                &lt;label for=&quot;dropdown-form-name&quot;&gt;Your name&lt;\/label&gt;\n                &lt;input\n                  type=&quot;text&quot;\n                  class=&quot;form-control&quot;\n                  id=&quot;dropdown-form-name&quot;\n                \/&gt;\n              &lt;\/div&gt;\n              &lt;div class=&quot;form-group&quot;&gt;\n                &lt;label for=&quot;dropdown-form-password&quot;&gt;Your password&lt;\/label&gt;\n                &lt;input\n                  type=&quot;password&quot;\n                  class=&quot;form-control&quot;\n                  id=&quot;dropdown-form-password&quot;\n                \/&gt;\n              &lt;\/div&gt;\n              &lt;input type=&quot;button&quot; class=&quot;btn&quot; value=&quot;Press Me!&quot; \/&gt;\n         &lt;span class=&quot;sr-only&quot;&gt;Submit Form&lt;\/span&gt;\n \n              &lt;button type=&quot;submit&quot; class=&quot;btn btn-success&quot;&gt;Submit&lt;\/button&gt;\n            &lt;\/form&gt;\n          &lt;\/div&gt;\n        &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/DhfV4Z41XeEHfuSdvfsSB7bloRKsE0gED8Y5guhkQ07wGtdg7gsDtgThfBUQgiGUDSpMR6OPKmtcyZpJttMWzz9rhDaHspXCv1UwZz4pJxIzMKVQE-iB9OPrGDqmrSl2YUCme-cb\" alt=\"\"\/><\/figure>\n\n\n\n<p>We simply make a regular form within the dropdown-menu container.&nbsp;<br><\/p>\n\n\n\n<p>The most common use case for this is a simple login form, just like in our example.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Note: Bootstrap included the sr-only class seen in the example, which stands for screen-readers only. The element is hidden on the page and only gets recognized by screen readers. This is important for accessibility purposes.<\/h5>\n\n\n\n<h3 class=\"wp-block-heading\">Dropup, Dropleft, Dropright<\/h3>\n\n\n\n<p>A few variants on the regular dropdown menu:<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">The Dropup Menu<\/h5>\n\n\n\n<p>We can use the dropup menu on a navigation bar that\u2019s docked to the bottom of the page:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropup&quot;&gt;\n        &lt;a class=&quot;btn btn-danger dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;\n          Dropup menu\n        &lt;\/a&gt;\n        &lt;div class=&quot;dropdown-menu&quot;&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;This is a&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Bootstrap&lt;\/a&gt;\n          &lt;div class=&quot;dropdown-divider&quot;&gt;&lt;\/div&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Dropup menu&lt;\/a&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/PSLbA19wFA_qmksK2qWBLWOO-tgqFKVEohoABuELm6t8-mHPgYNoCyjU6bOBkm_QwbpLyC4m4TL2p0kpuMP3uLFzGCqmElPOY3IvG2yfgOTOEuCymIS5asyke0PdmkX8i7uBkr4c\" alt=\"\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">The Dropleft Menu<\/h5>\n\n\n\n<p>We can use the dropleft menu when the button that opens it is touching the right edge of the screen, so that our menu doesn\u2019t go off screen.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropleft&quot;&gt;\n        &lt;a class=&quot;btn btn-danger dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;\n          Dropleft menu\n        &lt;\/a&gt;\n        &lt;div class=&quot;dropdown-menu&quot;&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;This is a&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Bootstrap&lt;\/a&gt;\n          &lt;div class=&quot;dropdown-divider&quot;&gt;&lt;\/div&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Dropleft menu&lt;\/a&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/Ua_HmI2iMnNSbySeQdM7pUIO88KwimOaTQQcly7INFtJIkJqOWBLx8oKFPmy8r_9GvhZkVOwyD58o_2ovpnURjq0zgGS-WCB2v4dqK3OJukg61bR136GK92D0AfdTTXkuhGnQI6S\" alt=\"\"\/><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">The Dropright Menu<\/h5>\n\n\n\n<p>And the dropright is the same as dropleft, only on the opposite side of the screen.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropright&quot;&gt;\n        &lt;a class=&quot;btn btn-danger dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;\n          Dropright menu\n        &lt;\/a&gt;\n        &lt;div class=&quot;dropdown-menu&quot;&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;This is a&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Bootstrap&lt;\/a&gt;\n          &lt;div class=&quot;dropdown-divider&quot;&gt;&lt;\/div&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Dropright menu&lt;\/a&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/y9TYXr0Pk_24Sf-wESau58XDDiqU_r9EvqxTd2S9cEkt3fXX-WkjidP2TzFA1tKtV5z0QVamsXD2ZEJIFQRPvhdzcpnSruoneYyNkS8rY5rS5wFaqTts9-FHnbSBI7hd6htHa1OD\" alt=\"\"\/><\/figure>\n\n\n\n<p>In each of these we\u2019ve included another bootstrap feature, an empty div with a class of dropdown-divider which gives us a nice separation of sections within the menu.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Dropdown With Header<\/h3>\n\n\n\n<p>We can have header text in our dropdown menu by making an element with a class of dropdown-header like so:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropdown m-4&quot; data-toggle=&quot;dropdown&quot;&gt;\n        &lt;button class=&quot;dropdown-toggle btn-info btn&quot;&gt;Entitled Dropdown&lt;\/button&gt;\n        &lt;div class=&quot;dropdown-menu&quot;&gt;\n          &lt;h2 class=&quot;dropdown-header&quot;&gt;I'm a title&lt;\/h2&gt;\n          &lt;a class=&quot;dropdown-item&quot; href=&quot;#&quot;&gt;We are&lt;\/a&gt;\n          &lt;a class=&quot;dropdown-item&quot; href=&quot;#&quot;&gt;Items&lt;\/a&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<p>Why use a heading instead of just a paragraph, span, or other text tag?&nbsp;<br><\/p>\n\n\n\n<p>A heading &lt;h1-h6&gt; plays a role in search engine optimization (SEO), so it\u2019s worth placing them where appropriate.&nbsp;<br><\/p>\n\n\n\n<p>If our dropdown hosts an important section of our website, it might make sense to give it some type of heading. Bootstrap also has some formatting applied to heading tags, which we can see in our example:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/L6jLyh3xE0SrOzcp7AvDMywGcnphGuyqUs-iOqYoApRvqY_cuEcy1OuoAZ2gQWHa-OsUL5A8zdHfLI-IJ10ydO_2zPJEFMkQHMHFzI8kV0ZcRqM2ytHaZ04bdl_Cp3EaEYDNE3Fk\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Right-Aligned dropdown<\/h3>\n\n\n\n<p>By default, Bootstrap\u2019s dropdown menus are left-aligned with the their toggle button.<br><\/p>\n\n\n\n<p>If a right-aligned menu would be a better fit for your design, or you simply prefer it that way, you can add a class of dropdown-menu-right to it:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropdown&quot;&gt;\n        &lt;a class=&quot;btn btn-danger dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;\n          Right-aligned\n        &lt;\/a&gt;\n        &lt;div class=&quot;dropdown-menu dropdown-menu-right&quot;&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;This is a&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;right-aligned&lt;\/a&gt;\n          &lt;div class=&quot;dropdown-divider&quot;&gt;&lt;\/div&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Dropdown menu&lt;\/a&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/EL0N0XI0dDWOJMytD6ao4Kt6tlxXcU32dz85aBGYQpLL1Qg2qaShRQRjjD-y7dkSHCZGiUi1fSrzG_JwYc-5fGfkmmQWW-X1M76EZfBawt0334yBHW3FluhbwgLodsi7pHStmZ9Y\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Active And Disabled Items In Dropdown<\/h3>\n\n\n\n<p>You can make a dropdown item disabled or active simply adding the appropriate class:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropdown m-4&quot;&gt;\n        &lt;button\n          class=&quot;btn btn-secondary dropdown-toggle&quot;\n          data-toggle=&quot;dropdown&quot;\n        &gt;\n          Disabled button menu\n        &lt;\/button&gt;\n        &lt;div class=&quot;dropdown-menu&quot;&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;This is a&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item disabled&quot;&gt;Disabled&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Button&lt;\/a&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/fGa6RJA3MSkBNsd5xkDXvydLoxaDba5QIK4hWtMcSYM6-U_bocSBt85UAD-7skOX6DwkkI1m7JRRqIX5tLfSL3IxnjzvI6r8vCPPHmCRygsreaMjYtWyZE-zWPnAEakYDHAt6T0W\" alt=\"\"\/><\/figure>\n\n\n\n<p>When might you want a disabled item in your menu? Maybe the option is currently unavailable, like worldwide shipping, the item is out of stock, or similar.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;div class=&quot;dropdown m-4&quot;&gt;\n        &lt;button class=&quot;btn btn-success dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;\n          Active button menu\n        &lt;\/button&gt;\n        &lt;div class=&quot;dropdown-menu&quot;&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;This is&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item active&quot;&gt;An active&lt;\/a&gt;\n          &lt;a href=&quot;#&quot; class=&quot;dropdown-item&quot;&gt;Button&lt;\/a&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<p>An active class on the other hand is made to grab the attention of the viewer, highlighting the current, or focused element. A potential use case for setting this class statically (without changing it or moving it from element to element) is for call-to-action (buy, register, subscribe etc.) buttons, or simply leading the users attention towards a certain element.<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/8qgBGU12k30cWW89VR6K_QeEIQJD_dBXzAkRR3hHYm1uE6qbj_HGfcB6CaxFu7j5oZTbxUXhM_nQU_NQIR6fk4RliG6lAubfvjfxNROKAPm948XxkoQtAzd_wc9Yq3EwDPB37D3j\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">You\u2019re ready for Bootstrap<\/h2>\n\n\n\n<p>Bootstrap is a very powerful framework built for rapid development, by abstracting away the setup necessary on each project, for each component.<br><\/p>\n\n\n\n<p>Today we learned how we can make different types of dropdowns with it, with no JS involved (at least not on our part).&nbsp;<br><\/p>\n\n\n\n<p>Now go and bootstrap a project!<\/p>\n","protected":false},"excerpt":{"rendered":"No matter if you\u2019re making a simple one page portfolio website, a monolithic app for a huge company, a blog, or a forum, chances are you\u2019re going to need a dropdown menu. A dropdown menu is especially useful when you have lots of links or actions, but not enough space on the page to display&hellip;","protected":false},"author":85,"featured_media":20302,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17287],"tags":[],"class_list":{"0":"post-21003","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-css"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"CSS","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Make a Dropdown Menu with Bootstrap | Career Karma<\/title>\n<meta name=\"description\" content=\"Learn how to easily implement a dropdown menu on your website using Twitter\u2019s Bootstrap framework made for rapid web development. Quick and easy with Career Karma.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Make a Dropdown Menu with Bootstrap\" \/>\n<meta property=\"og:description\" content=\"Learn how to easily implement a dropdown menu on your website using Twitter\u2019s Bootstrap framework made for rapid web development. Quick and easy with Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-08T05:53:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-29T19:01:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Stefan Dili\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stefan Dili\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/\"},\"author\":{\"name\":\"Stefan Dili\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/38a169875c6272296a3430eecc389f8b\"},\"headline\":\"How to Make a Dropdown Menu with Bootstrap\",\"datePublished\":\"2020-08-08T05:53:09+00:00\",\"dateModified\":\"2020-12-29T19:01:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/\"},\"wordCount\":1382,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg\",\"articleSection\":[\"CSS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/\",\"name\":\"How to Make a Dropdown Menu with Bootstrap | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg\",\"datePublished\":\"2020-08-08T05:53:09+00:00\",\"dateModified\":\"2020-12-29T19:01:41+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/38a169875c6272296a3430eecc389f8b\"},\"description\":\"Learn how to easily implement a dropdown menu on your website using Twitter\u2019s Bootstrap framework made for rapid web development. Quick and easy with Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg\",\"width\":1200,\"height\":800},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML\",\"item\":\"https:\/\/careerkarma.com\/blog\/html\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Make a Dropdown Menu with Bootstrap\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/38a169875c6272296a3430eecc389f8b\",\"name\":\"Stefan Dili\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/profilna-1-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/profilna-1-150x150.jpg\",\"caption\":\"Stefan Dili\"},\"url\":\"https:\/\/careerkarma.com\/blog\/author\/stefan-dili\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Make a Dropdown Menu with Bootstrap | Career Karma","description":"Learn how to easily implement a dropdown menu on your website using Twitter\u2019s Bootstrap framework made for rapid web development. Quick and easy with Career Karma.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/","og_locale":"en_US","og_type":"article","og_title":"How to Make a Dropdown Menu with Bootstrap","og_description":"Learn how to easily implement a dropdown menu on your website using Twitter\u2019s Bootstrap framework made for rapid web development. Quick and easy with Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-08-08T05:53:09+00:00","article_modified_time":"2020-12-29T19:01:41+00:00","og_image":[{"width":1200,"height":800,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg","type":"image\/jpeg"}],"author":"Stefan Dili","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Stefan Dili","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/"},"author":{"name":"Stefan Dili","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/38a169875c6272296a3430eecc389f8b"},"headline":"How to Make a Dropdown Menu with Bootstrap","datePublished":"2020-08-08T05:53:09+00:00","dateModified":"2020-12-29T19:01:41+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/"},"wordCount":1382,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg","articleSection":["CSS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/","url":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/","name":"How to Make a Dropdown Menu with Bootstrap | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg","datePublished":"2020-08-08T05:53:09+00:00","dateModified":"2020-12-29T19:01:41+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/38a169875c6272296a3430eecc389f8b"},"description":"Learn how to easily implement a dropdown menu on your website using Twitter\u2019s Bootstrap framework made for rapid web development. Quick and easy with Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/pankaj-patel-u2Ru4QBXA5Q-unsplash.jpg","width":1200,"height":800},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/bootstrap-dropdown\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"HTML","item":"https:\/\/careerkarma.com\/blog\/html\/"},{"@type":"ListItem","position":3,"name":"How to Make a Dropdown Menu with Bootstrap"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/38a169875c6272296a3430eecc389f8b","name":"Stefan Dili","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/profilna-1-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/profilna-1-150x150.jpg","caption":"Stefan Dili"},"url":"https:\/\/careerkarma.com\/blog\/author\/stefan-dili\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/85"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=21003"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21003\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/20302"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=21003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=21003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=21003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}