Reply to Re: Setting a css property value to !important with javascript & IE

Your name:

Reply:


Posted by Jim Higson on 10/01/05 00:21

Spartanicus wrote:

> Setting a css property value to !important like this:
>
> logoDiv.style.top='.5em !important';
>
> causes problems in IE, and afaics style.setProperty() isn't supported by
> IE.
>
> Anyone know of a work around for this?

how about having a CSS rule:

div.forceimportantstuff
{ top: 0.5em !important;
}

Then, when you want to set the !important stuff just do:

logoDiv.setAttribute( 'class', logoDiv.getAttribute('class') + ' forceimportantstuff' );

Of course, you'll have to deal with the class/className
confusion IE has.

[Back to original 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

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