Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Aligning an Image to the Centre Re: [Solved] Aligning an Image to the Centre

#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.