Webmaster's Community
Designing and Development => Programming => Topic started by: Anay on February 20, 2011, 02:30:14 PM
-
HI
I am not sure how to center image background in css. I am doing as following:
.back
{font-family:Verdana, Geneva, sans-serif;
background:url('images/nbg.jpg') repeat-y;
}
So how do I do it, if I do text-align=center , it has no effect on it.
Kindly guide.
-
That is easy, all you need to add "center" directive in your "background" element property.
see it ..
.back
{font-family:Verdana, Geneva, sans-serif;
background:url('images/nbg.jpg') repeat-y [b]center[/b];
}
And you are done !