Answer the question
In order to leave comments, you need to log in
How to position the dropdown list so that it does not go beyond the set aisles?
Jumping ahead a bit in my "css exercises" I want to know if it's possible to position a drop down menu with just css alone. Imagine there is a set width of 800px and the last menu item is pushed all the way to the right. And when I click on it, the dropdown goes beyond 800px. Can this be avoided with just css? And if so, please explain how.
Answer the question
In order to leave comments, you need to log in
This is not recommended for css.
But if for the sake of experiment, you can change the positioning of the drop-down list through the last menu item.
Your drop down list looks like this. Well, i.e. "hooks" to the menu item on the top left.
css
.subList {
...
position: absolute;
top: 0;
left: 0;
...
}
.items:last-child {
.subList {
right: 0;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question