Envisaging Wyatt Lyon Preul

Those are my eyes staring at you. They allow me to see you clearly through this screen. No, don't click there, it will take you away from my online space.

Let me start again, I am Wyatt and I am a software engineer. I am also a process theologian, author, music hipster, struggling artist who enjoys thinking outside of your finitude. I am not as pretentious as that line makes me sound. If you have some spare time read more about me.

CSS Tip: Targeting FF, IE7, and IE6

A A A

In IE7 the ability to precede your CSS with * HTML does not work.

Instead, * HTML will be left in the dust, working with IE6. This is a good thing though, because you can still use * in front of your CSS to target IE6 and IE7.

There are still some bugs that I have noticed in IE7b3 that you will need to be able to code for. However, there are also lots of bugs that do not exist in IE7 that do exist in IE6. In addition, the bugs that are in IE are more than likely not in FF. Therefore, in your CSS you want to make sure that you are targeting all three browsers individually.

To help with this I advice making your CSS work in FF. Once you have this working, then get it working in IE7, using the * technique to get things to display correctly. Once you get things working in IE7 then I advise using the * HTML to target any remaining issues with IE6.

Here is an example of what I mean.

.Content
{
margin-top: 4px; /* will position correctly for FF */
*margin-top: 5px; /* will position correctly for IE7 */
}

* HTML .Content
{
margin-top: 6px; /* will position correctly for IE6 */
}

In the above example, all three browsers were targeted. Now, I would think about how you have things organized so that you avoid having all of these hacks jumbled-up.

Tagged as: ,