Search

Rss Posts

Rss Comments

Login

 

Posts in ‘CSS’

IE7 CSS Hacks

Jun 20

#mm .rollOver {
height: 165px; /* IE 6 & bellow */
}
html>body #mm .rollOver {
height: 163px; /* FF & Others */
}
*:first-child+html #mm .rollOver {
height: 165px !important; /* #%@#%(! IE 7 */
}
p.style { color:red; } /* IE7 */
* html p.style { color:blue; } /* Other IE */
*|html p.style { color:pink; } /* FF, Opera, Konqueror, Safari */

#ie7-hook-id div[class^="target-class"] { background: #ff0000; }
div#ie7-hook-id .target-class { background: #0000ff; }

* div[class^="ie7-target-class"] { background: #ff0000; }
body .ie7-target-class { background: #0000ff; }

Valid CSS Selectors

* html {} /* IE 6 and below */
*:first-child+html {} * html {} /* IE 7 and below */
*:first-child+html {} /* IE 7 only */
html>body {} /* IE 7 and modern browsers only */
html>/**/body {} /* Modern browsers only (not IE 7) */
html:first-child {} /* Recent Opera versions 9 and below */

position: absolute center

Mar 21

read all »

How to test JavaScript in CSS?

Jan 20

When Explorer and Opera parsing the CSS file, encounter the JavaScript and execute it. Browsers execute it only once, though, so if you’d repeat the background-image: etc for another class or id, you still see one alert only.

So Lets Try this:

1
2
3
4
#Example {
border: 1px solid #000000;
padding: 10px;
background-image: url('javascript:alert(\'It works\');')

or

1
background-image: url('javascript:alert('It works');')
 
Get Adobe Flash playerPlugin by wpburn.com wordpress themes
31 queries. 0.328 seconds.