can we able to set the background img to contentplaceholder?
Hii..can any body tell me can we set the bacground image to the contentplaceholder???how can???
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manish Kumar ChoudharyPosted Jan 28, 2015, 1:13 AM
priya AvanigaddaPosted Jan 28, 2015, 1:03 AM
With in contentplaceholder am using div tag for setting the background image but it's not working properly
Manish Kumar ChoudharyPosted Jan 28, 2015, 12:59 AM
Hi priya Avanigadda
This largely depends on where your css file is located. If it is located in the same folder where the 'image' folder is located, then this looks correct. However, if you css file is in a different directory (say /css) then your link in your css file will not work. Instead, either change the css link to point to a complete link:
background-image: url('http://mysite.com/images/background.jpg)
I am unsure if the '~' link will work in a stylesheet. Since your css is in the scripts folder, you should be able to do this:
background-image: url('../images/background.jpg')
but you cannot since content place holder has no rendered html. If your content holder place holder resides say in a div.. set the back ground for that div element