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
  • 448
  • 1
  • 6
  • 19

1 Answers1

0

Try width this code:

Fiddle

.children {
    line-height: 48px;
    background: red;
    position: absolute;
    right: 0;
}
web-tiki
  • 92,319
  • 29
  • 210
  • 241
  • 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