Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2007
    Messaggi
    13

    Problemi bg-attachment campo input IE7

    Salve a tutti,

    mi trovo a esporre una problematica relativa all'interpretazione dei css da parte di Internet Explorer 7.
    In un sito che ho fatto per abbellire i campi di input di un form ho creato la classe:

    .textinput{
    width:160px;
    height:28px;
    background: url(input.gif) no-repeat left top;
    border:none;
    padding:6px 8px;
    margin-left: 5px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #4F2E04;
    }

    Con Firefox e Opera non ci sono problemi per IE 6 e precedenti ho aggiunto dentro l'html

    background-attachment: fixed;

    Il problema sorge con Internet Explorer 7: l'immagini di sfondo del campo di input o non si vede
    (se tratto IE7 come i precedenti) oppure scrolla mano a mano che inserisco il testo.
    Mi spiego meglio: quando il testo che inserisco supera la lunghezza del campo di input l'immagine di sfondo si sposta mano a mano verso sinistra sino a scomparire.

    Qualcuno ha idea di come si possa risolvere il problema? Ho cercato a lungo su Internet ma senza successo

    Grazie

    Kingcole

  2. #2
    Utente di HTML.it
    Registrato dal
    Jul 2007
    Messaggi
    13
    Ho trovato un altro utente che ha riscontrato lo stesso problema. Possibile che non esista una soluzione?


    dal sito http://www.zeldman.com/2006/10/27/ie7showandtell/

    I think I may have actually found a new IE7 bug encountered by no one else that I can find. It happens when you put a background image on an INPUT or TEXTAREA element…

    If a user put more text in a field than was allowed by the width of the INPUT the background image used to scroll with the text in IE6 and below so you’d make the background attachment “fixed” and hey presto, no more scrolling. Not so with IE7.

    Since they “corrected” the background attachment issues with IE7 there is now no way of having an overflow of text in a INPUT or TEXTAREA element and not having the background scroll with the text, and if you try “background-attachment: fixed;” forget it, the background doesn’t even display.

    I’ve been racking my brain for a solution to this problem and tried a bunch of different things…. the closes i’ve been able to come up with is putting “background-position: 100% 100%;” on the element, but the background image only seems to line up every second character (after it starts overflowing).

    Any ideas from all of you bright people?!!

    Thanks!!!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.