Hi
Well,yeah i would like to Center the Background Image In Css. Basically, I want a background image that can be used in the body or inside a div, which is centered.Anybody know how to do this
thanks for helping me..!!
Hi
Well,yeah i would like to Center the Background Image In Css. Basically, I want a background image that can be used in the body or inside a div, which is centered.Anybody know how to do this
thanks for helping me..!!
May be you can append this HTML code to the file
Code: <style type="text/css">
body { background: url(anypicture.jpg) fixed center no-repeat;}
</style>
just put this code in modification.for more information you can visit w3 schools
Hi there i know how to deal with this to insert a centered background Image, use this in your body definition inside a linked or import css file:
HTML
body { background-image: url(named_image.gif/jpg/png); background-position: center;}
At the same time to include the same information inside the Html file instead of the css file, use:
HTML
<body style="background-image: url(named_image.gif/jpg/png); background-position: center;">
You can try my easy way but Remeber that for IE, only the body can receive 'fixed' properties. Also, if you needed to a background image centered horizontally and vertically, it would be background-position: center center. Or it could be background-position.
HTML
body
{
background: url('named_image.gif/jpg/png') no-repeat center top fixed;
}
Bookmarks