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.

Cant get ie conditionals to work

Featured Replies

This code is correct:-

<link href="assets/scripts/styles.css" rel="stylesheet" type="text/css" media=

"all" />

 

<!--[if IE 7]>

<link rel="stylesheet" type="text/css" media="screen" href="assets/scripts/ie_7style.css" />

<![endif]-->

 

as the conditional comment is after the main stylesheet link and the css file url works:-

http://www.far-field.com/io/assets/scripts/ie_7style.css

 

so the problem must be with the styles that are in it.

 

Another possibility is that the @charset "utf-8"; at the beginning of the stylesheet is affecting it. You don't need it as you have utf-8 specified in the meta tag, so delete it from the css file.

 

Edit: the ie_7style.css stylesheet is working as I can change the background-color of #footer_mobs and it shows in my downloaded version of your page and the #footer_mobs position does change when I delete the ie_7style stylesheet.

  • Author

This code is correct:-

<link href="assets/scripts/styles.css" rel="stylesheet" type="text/css" media=

"all" />

 

<!--[if IE 7]>

<link rel="stylesheet" type="text/css" media="screen" href="assets/scripts/ie_7style.css" />

<![endif]-->

 

as the conditional comment is after the main stylesheet link and the css file url works:-

http://www.far-field.com/io/assets/scripts/ie_7style.css

 

so the problem must be with the styles that are in it.

 

Another possibility is that the @charset "utf-8"; at the beginning of the stylesheet is affecting it. You don't need it as you have utf-8 specified in the meta tag, so delete it from the css file.

 

Edit: the ie_7style.css stylesheet is working as I can change the background-color of #footer and it shows in my downloaded version of your page.

 

 

 

 

I can now can see the results.

 

Tried in ietester and could see the sheet. so looked at ff and ie devloper tools again :

 

Couple of things were throwing me. In ff3 firebug I was expecting to see the ie7style sheet under the dropdown in css tab. Not there.

 

Also in ie 8 the developer tool needs to have Browser Mode selected to 7 . I had just the document Mode set to ie 7

 

 

Thanks for your methodical workings out.

 

Much appreciated.

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.