Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Cross Browser Vertically and Horizontally Centered Images in CSS without Tables
SUBMITTED BY:
Guest
DATE:
May 1, 2013, 9:39 p.m.
FORMAT:
CSS
SIZE:
522 Bytes
Raw
Download
Tweet
HITS:
1157
Go to comments
Report
<
figure
class
=
'logo'
>
<
span
></
span
>
<
img
class
=
'photo'
/>
</
figure
>
.
logo
{
display
:
block
;
text-align
:
center
;
display
:
block
;
text-align
:
center
;
vertical-align
:
middle
;
border
:
4
px
solid
#dddddd
;
padding
:
4
px
;
height
:
74
px
;
width
:
74
px
;
}
.
logo
*
{
display
:
inline-block
;
height
:
100
%
;
vertical-align
:
middle
;
}
.
logo
.
photo
{
height
:
auto
;
width
:
auto
;
max-width
:
100
%
;
max-height
:
100
%
;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus