- This topic is empty.
May 22, 2013 at 2:19 am #44958goalieman34Member
I am looking to fix my second full width image (the one in the middle of the page) so that it auto fits horizontally the same as the one above in the header image. Can somebody check my CSS so see if it is correct. It needs to auto resize to fit the screen like the header image above. When I view it on mobile it is not fitting correctly. Thanks for taking a look.
}May 22, 2013 at 3:15 am #135969TheDocMember
Generally you just use `background-size: cover`, but there is some crazy CSS going on here.
That’s a huge red flag.May 22, 2013 at 10:05 am #136000schillMember
I was told not to use background-size:cover, because it isn’t supported in IE8. Does anyone have any recommendation on how they would approach this.
http://www.jobspark.caMay 22, 2013 at 10:15 am #136001unasAquilaParticipant
A [jQuery](https://github.com/louisremi/jquery.backgroundSize.js) solutionMay 22, 2013 at 10:34 am #136009
” background-size:cover ” is the best solution for this issue. for ie7 and ie8 try to use jquery background image re-size plugin (Please visit the link: https://github.com/louisremi/jquery.backgroundSize.js).
You can use conditional statement only for IE7 & IE8 (helps to optimize site loading time )May 22, 2013 at 10:49 am #136015schillMember
When i change background-size to cover it stretches the image all weird. Can you show me the css and html i need to insert for the JQuery. I have looked at the Github and not sure where the correct code is. Thanks for the helpMay 22, 2013 at 11:28 am #136025
Please download source code from github as ZIP file, zip file includes demo folder, you can find it the demo index.html file.May 22, 2013 at 11:31 am #136028
Add jquery file link to your project file.
Line Number: 63
File Name: index.htmlMarch 20, 2014 at 7:20 pm #166464
- The forum ‘CSS’ is closed to new topics and replies.