Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi
i'm looking for a background image to my div at center. As my div get the content dynamically so it leads to n number of pages. so i like to have a background image to every page until the div tag get closed.
i add a div tag to my html page

HTML
    <div id="abc" style="background-image:url('abc.png');background-repeat:no-repeat;background-removed:50% 30%;">

dynamic content loads here.... 
</div>





i am able to get a background image for single page only im unable to get the background image to the remaining pages .is there any jquery code to get background images to every page at centre.
Posted
Updated 7-Jun-15 21:59pm
v8
Comments
FrostedSyntax 22-May-15 19:33pm    
What is "background-image:removed(...)" as well as "background-removed: ..."

I have never seen these property names before and wonder what their purpose is. Pardon me if it is a well known property.
Anil Kumar Ch 8-Jun-15 3:59am    
Sorry for that Can u check it now.

You can make your div image as transparent and set as your background screen.

html,body {
margin:0;
padding:0;
height:100%;
width:100%;
background: url(model.png);
background-size: 100%;
}
#full-screen
{ height:100%;
width:100%;
overflow:auto;
background:#FF2400;
opacity:0.2;
}
 
Share this answer
 
have you tried something like:

JavaScript
$('div').css({'background-image': 'url(abc.png)', 'background-repeat': 'none'});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900