The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Using display:none for a banner image?
I have a banner logo that is 970px wide. This is fine for desktop and tab devices yet for mobile devices I’m unsure as to display it or not.
I think display:none; is the better option yet if I wanted to add another banner for mobile devices what is the better css option to use (would rather stay away from .js?
The best solution here would be to use a media query to display a different sized banner.
Wouldnt the width set to 100% on the banner div in the media query make the banner fit the screen of the smaller device?
As @TheDoc says, media queries would be the way to go provided you use the image as a background and not actually put the image in the banner element.