0

I'm trying to make my sub-menu have the same width as the entire parent menu, however of course the sub-menu is taking on the width of it's parent li. I also need the sub-menu li items to be floated left next to each other - i tried doing padding: 0 -421%; on dropdown-menu which made it the same width as the actual parents menu, but of course i cannot float the li's inside the dropdown menu due to the extra padding.

The fiddle

<a href="/">

(added as i keep getting "jsfiddle must be accompanied by code" error).

zessx
  • 68,042
  • 28
  • 135
  • 158
Nikki Mather
  • 1,118
  • 3
  • 17
  • 33

2 Answers2

0

Try this:

 .dropdown-menu {
     width:597px;
  }
  .dropdown-menu li {
     float: left;
  }

Not the best of approach,but this should give you what you were looking for.

phpcoderx
  • 570
  • 5
  • 16
0

As your submenu seems to only be used on large devices, I would suggest to fix its width :

@media (min-width:991px) {
    #slidemenu .dropdown-menu {
        width: 910px; 
        padding: 5px;
    }
}

Why 910px :

{container size} - {container horizontal padding} - {navbar-collapse horizontal padding}
= 970 - (15 + 15) - (15 + 15)
= 910

zessx
  • 68,042
  • 28
  • 135
  • 158