Question

I have DIV, and UL inside it, with position: absolute. By default left is 0px. I need to move UL to the left on the 100% of UL width. UL right corner would be where DIV left corner begins.

Was it helpful?

Solution

Have you tried giving the UL the style:

ul { margin-left:-100%; }

That should move it left the same width as the UL, and will render outside the div. Without more page source, its hard to tell how that will affect the rest of your layout though...

Edit:

To make the UL move relative to the DIV, also set:

div { position:relative; }

OTHER TIPS

If you know the width of your ul, set the left property to be -that width, e.g.

left: -100px;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top