I have this code: http://jsfiddle.net/LW9DJ/1/
Now i want the overlay text to appear centered (wich is currently working) but i dont want the css class 'mycell' to have the width or height attributes setted, i want them inherited from 'container' class.
This is because i am going to implement this in a responsive website in wich the width and height of 'container' class are automatically changed.
<img src="http://i.imgur.com/o7iAFMu.jpg" class="test" />
<div class="mycell">Some Text</div>
You should make left-margin and right-margin properties of style, auto. When you assign auto values to these two properties, the div would be located at the center.