Home › Forums › CSS › [Solved] Aligning an Image to the Centre › Re: [Solved] Aligning an Image to the Centre
June 21, 2011 at 12:36 pm
#82000
Jeager
Member
Is it a background image? Thrown in a div, how is it positioned? Im going to assume its a bg image, so in your css you can use something like:
body
{
background-image:url('smiley.gif');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center;
}
And if I recall correction, you can do ‘center center’ for it to be vertically aligned also.