Question: I'd like to place dropdown (html select) to element with position: absolute, but the problem that when i push select to open menu it doesn't open. The button pushes but it doesn't open.

I have board (dive element) on on this board there are a lot of tiles (divs) with css like:

```
position:absolute
z-index: 2

```

And one of them contains chart library, called Highcharts. Highcharts container has z-index = 0

So it looks like

```
<div class='tile'> //position: absolute, z-index = 2
     <div class='highcharts-container'> //position: relative, z-index = 0
          <div class='controlPanel'>   //position:absolute, no z-index
              <button 1> //relative
              <button 2> //relative
              <wanna place here dropdown, so select> //!!!my dropdown
          </div>
     </div>
</div>

```

I tried to just put dropdown in div container with position relative, but without any result.

My code of addition:

```
 var chooseContainer = $('<div class="rangeContainer"></div>');
 var chooseRange = $('<select class="rangeDropdown"></select>');
 var element1 = $('<option value="volvo">Volvo</option>');
 var element2 = $('<option value="saab">Saab</option>');
 chooseContainer.append(chooseRange);
 chooseRange.append(element1);
 chooseRange.append(element2);
 chartControlPanel.append(chooseContainer);
 chartControlPanel.append(addBtn);
 chartControlPanel.append(resetBtn);
 chartControlPanel.append(legendBtn);

```

Edit (drawing of how it looks):
![dropdown problem](https://i.stack.imgur.com/mEXaq.png)

Thanks in advance! :)

JSfiddle:

<http://jsfiddle.net/akorovin/cq2be/>

Probably it's a problem with highcharts or with my css

Answer: 
The hash code for the lists is not going to match. So the whole hash code won't match. 

Try this:

```
 public int GetHashCode(Column obj)
 {
     return 42;
 }

```

Hash codes must be equal if the objects are equal. It is not ideal in general to return a fixed number, but it is entitily valid. Why 42? Hitch hikers fan.

If that works, then you can look for a better hash function that actually uses some of the values in the list.

How complex you make the hash function is up to you as long as you follow the golden rule of objects are equal, their hash functions must be equal. 

Here is for example a valid hash function that just takes into account the length of the list:

```
 public int GetHashCode(Column obj)
 {
    return obj.ListOfSections.Count;
 }

```
Probably you need HasSet

Override GetHashCode and Equals method in your Column class

Add your objects to HashSet and you will get unique set.

for e.g. var columns = new HashSet(columnList); 

Below is the example using string

```
        public void ListToHashSet()
    {
        var list = new List<string> { "abc", "efg", "abc", "efg" };
        var set = new HashSet<string>(list);
        foreach (var item in list)
            Console.WriteLine("list:{0}", item);

        foreach (var item in set)
            Console.WriteLine("set:{0}", item);
    }

```

And check the output, as for .net string class already has override for GetHashCode and Equals you don't need to implement, but for custom class you will need to override both, Gethashcode for storing and retrieving from HashTable and GetEqual for equality of two object.