I’m hiding an inline-block element inside of a parent div with overflow:hidden. I am then offsetting the original child element using the left property (negative), so it is hidden. I can make it reveal itself back into the parent using CSS3 transitions, but I’m having to give that negative offset a fairly large number (the width of the parent div), making the timing depend on how much text there is. I need it to be perfect (for reasons not explained here). It would be perfect if the left value always matched the width value of the inline-block element.
Is there any way to find the width of an inline-block element and apply that value to its left offset in CSS3?
I have a feeling I’m going to have to use jQuery, I’m just hoping someone here might have a wonderful solution. 🙂
Example here:
http://jsfiddle.net/RD7Yv/1/
try
left:-100%, This should work.EDIT:
fiddle