Forum Moderators: not2easy
.databody2 { text-align:left; width:345px; margin:0px; padding:0px; }
AND
html>body .databody2 { text-align:left; width:345px; margin:0px; padding:0px; }
In the site in question, there are many if not most classes dual defined in this way.
html>body .databody2 {....} This effectively hides the declaration of .databody2 from IE5.5 and IE6 since these browsers do not support the child selector '>'. However, IE7 does support this AND it doesn't hide the declaration from IE5.
Besides, the rules for each are the same, so I see no reason behind this(?) Anyone?
Usually the "holly hack", "tan hack", the "commented backslash hack" and others are used in tandem with each other. I would imagine the css has elements with more than one width size, like:
#samename {
width: 100px;
padding: 10px;
border: 5px solid black;
margin: 10px;
}
/* A CSS comment before the hack to hide it from ie 5.x for mac \*/
* html #samename {
width: 130px;
}
/* Another CSS comment after the hack completes the commented backslash hack */
As I was typing these, I realized something ... I bet that the duplicates that start "html>body ...etc" are in a different section of the css and have other style elements that are actually different
The straight class declaration is always followed by a Hack version, but only once out of twenty declarations is the Hack Version different. It appears to be an extravagent plan ahead method.
When in a hurry, and coding a lot of pages using a base template I made, I am guilty of doing this as a quick fix rather than properly renaming the id or class for one page.
**********************
>>Of course a major problem might be that when IE7 comes out soon, most hacks will be broken. <<
We all knew they were going to pull this one day. We just KNEW IT. It is amazing how they can actually be so obviously and intentionally contrary as to fix the BUG that let's the hack properly display standards css without even considering fixing the reason the hack is necessary.
For every good step they make towards the opne source, standards accepting community, they always take two giant backsteps.
They will not accept that they won the browser wars in 2000 until they are the only broswer in the world people use. Thankfully FF converted so many PC users.