Click here to Skip to main content
15,892,737 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I placed PANEL and then a background image on this panel. now how should i autosize this background image as i used AUTOSIZE to adjust the panel size ??

please help !!
Posted
Updated 8-Sep-12 22:52pm
v2
Comments
Sandeep Mewara 9-Sep-12 7:05am    
Autosize to what? Whats your end goal?

1 solution

Hi there,

You cannot resize a background image using CSS/HTML. You will need to use an Image tag that resizes to the size of your panel (can be done with CSS) and some CSS to place the image behind the panel (use "position:absolute" styling on the image!).

Please just search Google on how to do this - it is very simple and there are many examples. Try searching "div over top of image" then apply the principal ideas to get a panel over the top of an image (where the image is then your background image).

Hope this helps,
Ed
 
Share this answer
 
Comments
Manvir k. 10-Sep-12 5:34am    
Thank you Ed.

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