Reputation: 151
I have a panel which has top:-138px; I want to give this in %, i tried giving negative percentage but it doesn't seem to be working.
Upvotes: 4
Views: 6336
Reputation: 15936
You can do this as long as its parent element has a defined height, whether in pixels or percentage. If you play around with this fiddle, you'll notice that the inner element's top
attribute is only respected if you give the container an explicitly-definied height
.
Upvotes: 2