I want to have a CSS div that has a background image (the full image size is 950px x 306px), that shows the entire background image, and that adjusts the sizing of the background image depending on the browser size.
So the CSS div code should:
- Have a background image of some picture with a max width of 950px and max height 306px
- Show that entire background image (adjust the image size to fill the entire div)
- Resize itself automatically depending on size of the the enclosing div / browser width (some definition like width=”100%”)
Can someone please help with this? I’m really new to CSS and have been trying many different methods but none seem to work. I really appreciate your help!
P.S. No JQuery please 🙂
1 Answer