So, I'm making these tumblr themes and I'm having trouble centering an auto width element. I want the info box to be in the very center of the picture (and now it's not):
http://38.media.tumblr.com/200719998b2a013bf244db059eb89559/tumblr_nars2tF6t51tko1yno1_500.png
The width of the box is not a constant, because the number (note count) could have from one to many numbers.
The current code is:
#info {
background-color:{color:Info Background};
color:{color:Text};
font-size:10px;
font-family:cambria;
line-height:160%;
width:120%;
height:18px;
opacity:0.8;
letter-spacing:1px;
text-align:center;
z-index:2;
}
#posts:hover .i {
opacity:1.0;
transition-duration: 0.6s;
-moz-transition-duration: 0.6s;
-webkit-transition-duration: 0.6s;
-o-transition-duration: 0.6s;
z-index:2;
}
.i {
opacity:0.0;
width:auto;
position:absolute;
left:50%; /* my mistake is here somewhere, I guess*/
top:50%;
transition-duration: 0.6s;
-moz-transition-duration: 0.6s;
-webkit-transition-duration: 0.6s;
-o-transition-duration: 0.6s;
z-index:2;
}