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???
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Jan 27, 2015, 7:59 PM EST
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
priya AvanigaddaRank #7,836 · 233 reputationPosted Jan 27, 2015, 8:03 PM EST
With in contentplaceholder am using div tag for setting the background image but it's not working properly
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Jan 27, 2015, 8:13 PM EST