Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Deliver an img to IE only

Featured Replies

Hi All,

 

I'm having a little problem with an img... as we know ie6 does not show transparent pngs without hacks... im trying to go hack free and use valid markup...

 

My logo is a png... works fine in every browser, only ie6 and down is the problem... i have a conditional css sheet targeting ie6

 

My markup is this:

 

 

 <div id="logo">

           <a href="index.html"><img src="images/global/logo.png" width="138" height="156" alt="" /></a>

</div><!-- /logo -->

 

As you can see the img is inline and not a background img... how can i deliver a jpg of the img to ie? so i want to take away the png, then replace it with the jpg... i know i can do it as a background img in the css but is there an inline way to do it?

 

thanks

Edited by Renaissance-Design
Please use the code button or tags to format your code.

  • Author

Oh and one other thing... I did not really want to use an empty div on this... so thats why im looking for other options than the css background-img

 

thanks

You are allowed to use conditional comments in the body markup, although it should be the minimum. This works in IE9 and Firefox and should work in IE6 although I haven't tested IE6. There's a different image for non-IE browsers, IE greater than IE6, and IE6.

<![if !IE]><img src="raindroplets.jpg" 
alt="Raindroplets" /><![endif]> <!--NOT IE browsers-->

<!--[if gt IE 6]><img src="100x100orange.jpg" 
alt="Orange " /><!endif]--> <!--IE greater than IE6-->

<!--[if IE 6]><img src="100x100pxsquare_a.jpg" 
alt="Square A" /><![endif]-->

 

Javascript is the normal method of dealing with png images in IE6.

Edited by Wickham

  • Author

thanks both, ive gone with the java one from might pirate though... works like a charm...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.