0

I have made a simple dropdown menu. The navigation is floated right inside a 500px container. If I its the last (the one most to the right) that is active the dropdown will overflow the container. How would I limit it so it wont overflow but just float right instead. example

JS Fiddle

Rasmus Nørskov
  • 478
  • 1
  • 6
  • 20

1 Answers1

0

Try width this code:

Fiddle

.children {
    line-height: 48px;
    background: red;
    position: absolute;
    right: 0;
}
web-tiki
  • 99,765
  • 32
  • 217
  • 249
  • The thing is I want them in the left side unless they overflow the container – Rasmus Nørskov Dec 04 '13 at 15:58
  • then you will have to use jquery. Have a look here:http://stackoverflow.com/questions/11512032/detect-if-dropdown-navigation-would-go-off-screen-and-reposition-it – web-tiki Dec 04 '13 at 16:08