Input

Eléphanteau du PHP | 17 Messages

23 août 2007, 23:28

Je veux changer l'image de fond d'un input. Tous fonctionne dans mozilla mais IE7 l'image n'est pas fixe et quand j'essaie de mettre backgroud-position: fixed; sa fonctionne pas.

Je met un bout de code css et html

Code : Tout sélectionner

<form name="searchForm" action="<? $php_self ?>" method="post"> <table width="180" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3"></td> </tr> <tr> <td width="20" height="20"></td> <td width="140" height="20"><input name="txtSearch" type="text" id="searchbar" maxlength="100" /></td> <td width="20" height="20"></td> </tr> <tr> <td colspan="3"></td> </tr> </table> <input type="hidden" name="submitted" value="TRUE" /> </form>
le css j'ai pas trouver de maniere pour que ie 7 fonctionne correctement

Code : Tout sélectionner

#searchbar_module{ padding: 0; margin: 0; width: 180px; height: 46px; background: url(../img/nav_searchbar_img.gif); background-repeat: no-repeat; outline: none } #searchbar{ width: 110px; padding: 4px 10px 0px 20px; height: 15px; background: transparent url(../img/searchbar_background.gif); background-repeat: no-repeat; border: none; color: #999999; font-size: 9px; font-family: Verdana; } *+html #searchbar{ width: 140px; padding:0; height: 19px; background: transparent url(../img/searchbar_background.gif) no-repeat; background-position: fixed; border: none; display:table-cell; color: #999999; font-size: 9px; font-family: Verdana; }
J'Ai eesayer de hacker le css pour mettre un style different mais j'ai pas reussi a mettre limage fixe meme en utilisant l'option fixed.

Merci de maider
Better to fight for something than live for nothing.

Mammouth du PHP | 2937 Messages

31 août 2007, 18:04

Les hacks CSS ne fonctionnent pas avec IE 7. À la place, utilise des commentaires conditionnels.