I'm having a weird issue trying to get my site logo to display properly across all browsers. My current code works perfectly for chrome, firefox, and safari, but the no-repeat isn't working in ie8.
= stylesheet_link_tag 'application'
/[if lt IE 9]
= stylesheet_link_tag 'ie8/ie8'
= link_to 'Logo', root_url, id: 'logo'
background-size: 100% Auto
I'm able to solve the ie8 image repeat problem by changing my header.sass file to:
background: 'logo.png' no-repeat 100% Auto
Fixing the sass file to account for ie8 breaks all the other browsers, though; the image is no longer the right size. Is there any way I can reconcile the two? I'd like to get the ie8 browsers working if at all possible, but not at the expense of the other browsers.
you probably need the hashrocket for the id
= link_to 'Logo', root_url, :id => 'logo'
IE8 requires a
in the beggining of your html document in order for a no repeat function to work...
In your case however, you would need to do
so your code would be