You are here: editing this IE hack? « HTML « IT news, forums, messages
editing this IE hack?

Posted by John Salerno on 11/22/75 11:39

Here's the example I'm working from:
---------------
The * html Hack

Several readers bristled at my use of the now unfashionable * html hack.
As well they should! The workaround is trivial. I considered including
it in the article, but I decided that it broke the flow, and that anyone
concerned enough would be able to maneuver around it.

So instead of doing this:


#left {
right: 200px; /* LC width */
}

* html #left {
left: 150px /* RC width */
}

.... do this:


#left {
left: 150px /* RC width for IE 6 */
}

#container > #left {
right: 200px; /* LC width for everyone else */
}
------------

Now, the CSS I'm working with is slightly different, but to put it in
line with the above example, I just did the switch. Of course, this
wrecked the look of it. Here's what I had to work with originally:

#left {
width: 180px; /* LC width */
padding: 0 10px; /* LC padding */
right: 240px; /* LC fullwidth + CC padding */
margin-left: -100%;
}

/*** IE Fix ***/
* html #left {
left: 150px; /* RC fullwidth */
}

And I changed it to this:

#left {
width: 180px; /* LC width */
padding: 0 10px; /* LC padding */
left: 150px;
margin-left: -100%;
}

#container > #left {
right: 240px;
}

But that didn't work. So is there more math involved to make the change?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация