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.

CSS with ie 6

Featured Replies

hi peeps, just a quick question of ethics i guess, throughout my short period of time as a web developer since graduating, ive always tried to develop a site that is usuable across a whole range of browsers, for me its easier to develop for ie7 firefox 2 & 3 safari etc, i always seem to spend most of my time, after finishing reworking this to get it to look right in ie 6, sometimes remaking seperate stylesheets with styles specific for ie6 and sometimes this takes time, now ive just found this little beauty while trawling through the net.

 

body {
background-color:red;
_background-color:red;
}

 

as you can see that second style with the underscore will be picked up by only ie6 and then applied (well according to what i read, so dont go off on one if im wrong).

Now with this in mind today i have found myself working on a site, instead of making seperate tweeks in a ie6 file, i have put the tweek inside the same css file with the underscore, now this has an advantage from what i can see, is that all the css is now in one file, and no need to go looking about to pick out the changes, so less stress when trying to pin point mistakes,

 

now what my dilema is, is this, SHOULD I BE DOING THIS, ive read a million different posts about if your good at CSS tweeks wont have to be made, and only one style sheet would ever be needed that works across all browsers (so i kinda feel like im cheating a little with this underscore way), but all the sites i have built in some way needed a slight tweeking for ie6 to render correctly, and sometimes this only might be one or 2 rules in a seperate stylesheet, but apart from that everything renders fine across the bored in every other browser,

 

so am i wrong in feeling bad about starting to take this approach and is it frowned upon be fellow developers???

 

would be good to know your thoughts on this

 

thanks

 

Dan

Hi Dan,

I don't think that you should worry to much about this css hack. I use this and the other '#' trick for the ie7 and I think it is not a bad thing at all. I suppose the main think we all must focus is the customer experience and the usability not the 100% valid css code.

 

Regards

Zoli

  • Author

i do see what you mean by that, and at the end of the day it is the end user that counts, its just i do like to get fully valid css etc, so spending time going through it all again is sometimes very time consuming. even though the company where i work i must admit that fully valid css isnt a major thing, as again its the user expericence that is more important.

Use conditional statements then that load a completely separate stylesheet for IE6. This way you separate all the "hacks" into their own CSS file that you can make as valid as you like.

 

Of course there's tyhe argument that IE must die and therefore should we bother, but let's not get into that here!

  • Author

lol true badmotherz quite true, it is a pain sometimes having to change things to get it to work in ie6, the strange thing is a lot of the clients i seem to get still seem to be running ie 6 which is a right mare. and its not like i can just say to them u know what just upgrade your browser as they would probably take offence and not want to use us!!!

 

lol

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.