The Semantic-UI Dropdown does not appear when utilizing the sidebar feature

Is it normal for a dropdown in the pusher not to show when using a sidebar? I tried setting overflow-visible but it didn't work. Any suggestions on how to resolve this?

Check out this JSFiddle example: https://jsfiddle.net/3djmjhn5/1/

Code:

$('.sidebar').sidebar({
context: '.pushable'
})

$('.dropdown').dropdown();
.pushable {
  height: auto!important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.js"></script>

<h2>Dropdown doesn't Show when using sidebar</h2>

<div class="pushable">
  <div class="ui visible sidebar menu">
  </div>
  <div class="pusher">
    <div class="ui inverted menu">
      <div class="item">stuff</div>
      <div class="ui dropdown item">
            <div class="default text">select one</div>
            <input type="hidden" value="">
            <i class="dropdown icon"></i>
            <div class="menu">
                <div class="item">Stuff 1</div>                
                <div class="item">Stuff 2</div>
                <div class="item">Stuff 3</div>
                <div class="item">Stuff 4</div>
                <div class="item">Stuff 5</div>
                <div class="item">Stuff 6</div>
            </div>
      </div>
    </div>
  </div>
</div>

<h2>Will Show Normally</h2>
<div class="ui inverted menu">
  <div class="item">stuff</div>
  <div class="ui dropdown item">
    <div class="default text">select one</div>
    <input type="hidden" value="">
    <i class="dropdown icon"></i>
    <div class="menu">
      <div class="item">Stuff 1</div>                
      <div class="item">Stuff 2</div>
      <div class="item">Stuff 3</div>
      <div class="item">Stuff 4</div>
      <div class="item">Stuff 5</div>
      <div class="item">Stuff 6</div>
    </div>
  </div>
</div>

Answer №1

To customize the overflow property of Semantic UI elements, you can use !important. Check out the code snippet below for an example:

$('.sidebar').sidebar({
context: '.pushable'
})

$('.dropdown').dropdown();
.pushable {
  height: auto!important;
}

.pusher {
overflow: visible!important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.js"></script>

<h2>Dropdown doesn't Show when using sidebar</h2>

<div class="pushable">
  <div class="ui visible sidebar menu">
  </div>
  <div class="pusher">
    <div class="ui inverted menu">
      <div class="item">stuff</div>
      <div class="ui dropdown item">
            <div class="default text">select one</div>
            <input type="hidden" value="">
            <i class="dropdown icon"></i>
            <div class="menu">
                <div class="item">Stuff 1</div>                
                <div class="item">Stuff 2</div>
                <div class="item">Stuff 3</div>
                <div class="item">Stuff 4</div>
                <div class="item">Stuff 5</div>
                <div class="item">Stuff 6</div>
            </div>
      </div>
    </div>
  </div>
</div>

<h2>Will Show Normally</h2>
<div class="ui inverted menu">
  <div class="item">stuff</div>
  <div class="ui dropdown item">
    <div class="default text">select one</div>
    <input type="hidden" value="">
    <i class="dropdown icon"></i>
    <div class="menu">
      <div class="item">Stuff 1</div>                
      <div class="item">Stuff 2</div>
      <div class="item">Stuff 3</div>
      <div class="item">Stuff 4</div>
      <div class="item">Stuff 5</div>
      <div class="item">Stuff 6</div>
    </div>
  </div>
</div>

Answer №2

The reason for this issue is the use of overflow: hidden in the classes .pusher and .pushable.

To resolve it, simply change overflow: visible for both classes.

Add an id to your .pusher element (for example, my-pusher) and update the CSS as follows:

.pushable {
  height: auto;
  overflow: visible;
}
#my-pusher.pusher {
  overflow: visible;
}

Here's a link to the updated code on jsFiddle.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Navigating to the left while implementing right-to-left formatting on a single webpage

I'm currently working on a website and I decided to make it right-to-left (RTL). Everything looks good on the website, except for one specific page. I'm experiencing some difficulties in implementing RTL on this particular page. Although the ot ...

Aligning Description Item components horizontally in antdLearn how to easily horizontally align Description

Currently, I am utilizing the `antd` Description components. In this scenario, when there is no `title` for the items, the value should be aligned to the left. You can see an example of this alignment in the image below: https://i.sstatic.net/Ah70f.png I ...

Utilizing Cookies within an HTML Page

My current code is functioning perfectly, accurately calculating the yearly income based on the input "textmoney." I have a link to a more advanced calculator for a precise prediction. My goal is to find a way for the website to retain the data input from ...

Modifying the background hue of the element-ui tooltip

I am currently working with vue.js version 2.6.10 and element-ui version 2.15.1. The element-ui component I am using is as follows: <el-tooltip content="Top center" placement="top"> <span>Dark</span> ...

What is the best method for adding anchors or appending items in aspx pages?

I have created code for an image gallery on my webpage, "gallery.aspx". The situation is that I have an external aspx page with various links. When a user clicks on one of these links, I want them to be redirected to the image gallery but to a specific ima ...

Elevate the expanded card above the others on hover instead of displacing them downward

I'm working on a grid of cards where hovering over one card expands the bottom section to reveal more content. The issue is, when it expands, it pushes all other cards down. What I actually want is for it to overlay on top of the card below it. Here ...

Preventing repetition of data and storing submitted form inputs in a cache

I am facing an issue with my code that checks for duplicate entries based on the USER ID in the database. When I submit the form and the USER ID already exists, it clears all other fields on the form, requiring me to re-enter all details again. This is fru ...

Include an iframe with hidden overflow specifically for Safari browsers

I have a situation where I'm using a third-party iframe to display specific content. The iframe is enclosed within a div container that has border-radius and overflow: hidden properties applied. Strangely, the content inside the iframe doesn't se ...

The collapsing menu is malfunctioning due to duplicate selectors

Although I have been learning HTML, CSS and jQuery, one area that always trips me up is selectors. Currently struggling with redundant selectors. I am attempting to customize the ul and li elements after collapsing the li, however, the selector doesn&apos ...

Chrome now supports clickable circular canvas corners

I have a unique setup with two canvases. I've customized them to be circular by utilizing the border-radius property. The second canvas is positioned perfectly within the boundaries of the first one using absolute positioning. This is where it gets e ...

When scrolling back to the top of the page, the data-spy feature does not re-highlight the "Home" anchor

After experimenting with Data-spy to change the active anchor while scrolling, I encountered an issue. Upon scrolling back up to the top of the page from the about section, the "Home" anchor failed to re-activate. How can this be fixed? I attempted to rem ...

Tips for fading an image as you scroll using CSS and JavaScript?

I have been dedicating my day to mastering the art of website development. However, I am facing a challenge that is proving to be quite difficult. I am looking to create a smooth transition effect where an image gradually blurs while scrolling down, and re ...

Creating content on HTML AzureWebApp for transfer to CDS

Currently, my web app is running on azurewebsites.net. I am looking to extract data from a text field or captured photos and save it in the CDS / Dynamics 365 CE database. The website design is complete; I just need to focus on storing the data efficient ...

After each animation in the sequence is completed, CSS3 looping occurs

I have currently set up a sequence of 5 frames, where each frame consists of 3 animations that gradually fade into the next frame over time. My challenge is figuring out how to loop the animation after completing the last sequence (in this case, #frame2). ...

Using AngularJs: Invoking Service/Provider in app.config

I need to access my service from within app.config. While searching for a solution, I came across this question, which presented a potential solution that I attempted to implement (not the accepted answer, but the one below with the title "Set up your ser ...

Can I create personalized animations using Compass?

I am curious about how to convert this code into Compass mixins @-webkit-keyframes shake { 0% { -webkit-transform: translate(2px, 0px) rotate(0deg); } 10% { -webkit-transform: translate(-1px, 0px) rotate(-1deg); } 20% { -webkit-transform: tran ...

Using data variables as arguments in the style section of Vue2

Suppose we have a data variable and I want to utilize this data variable for styling purposes. data() { return{ selected:{ index: 2 } } } <style> .parent-table >>> .table-row:nth-child(/* here I intend to use ...

Unable to transmit information to a different page

My goal is to transmit both hidden data and user input data to another page. Initially, I attempted to have just one user input field, which allowed the system to transmit the data successfully. <h1><strong>Please scan barcode on JIG</stron ...

How can I adjust the Bootstrap container width without it changing when resizing the browser window?

As I work on developing my website, I am utilizing Twitter's bootstrap grid system. Despite my efforts, I have been unable to find a solution for fixing the width of the site. My goal is to lock the size in place so that it remains constant regardless ...

Using XSL variables in JavaScript code

I've noticed that there have been similar questions asked, but none of the solutions seem to help in my case. So, I have this variable named 'var': <xsl:variable name="var"> val </xsl:variable> Now, I want to use it like thi ...