Reputation: 776
Hello Stackoverflow community, ive got question about positioning my div. When i double click td, div appears, but if that td is near right side, my div goes out of width, is it possible somehow to change floating from right side of mouse to left side? Here is the picture. Thats how it looks like if i want to change date which is in the right corner:
As you can seee:
How can i fix this to fit in window no matter what?
Upvotes: 0
Views: 33
Reputation: 37701
It's not a floating div, it's absolutely positioned.
The problem is that left: 1094px
rule you have. Change it to right: 0px
and experiment with the number that works the best.
If you want to lock it on the right edge of the parent element, make sure you put position: relative
to the parent element.
Upvotes: 2