/    Sign up×
Community /Pin to ProfileBookmark

textarea background-repeat IE7

[url]http://www.themenubag.com/2008/contacts.php[/url]

On the form fields, i’ve got the following css:

[code=html]textarea.message {
background-color: #dcc9a7;
border:0px #dcc9a7 solid;
color: #78582f;
background-image: url(images/form_bb2.gif);
background-repeat: no-repeat;
font-family:Arial, Helvetica, sans-serif;
font-size: 12px;
width:204px;
height:91px;
padding:5px;
}
input.contact {
background-color: #dcc9a7;
border:0px #dcc9a7 solid;
color: #78582f;
font-size: 12px;
background-image: url(images/form_bb.gif);
background-repeat: no-repeat;
width:204px;
height:25px;
padding:5px;
vertical-align:middle;
}[/code]

In IE7, when you type to much in the input fields…the background image repeats to the left and right, so it appears to ‘scroll’ as you type. In the textarea..typing to much, or pressing multiple enters causes it to scroll down as it would seem…but with no-repeat on the background image just disappears, with it off, it of course repeats.

Is there any kind of IE hack for this?

Oh also, in IE7, adding no-repeat to the end of the background-image tag (instead of putting it in its own tag) caused the background images to disappear all together.

Thank you!

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@FangDec 19.2007 — Is there any kind of IE hack for this?[/QUOTE]The attribute: [I]maxlength="45"[/I]

Oh also, in IE7, adding no-repeat to the end of the background-image tag (instead of putting it in its own tag) caused the background images to disappear all together.[/QUOTE]You haven't done this on the site.

Wrongbackground-images: url(images/form_bb.gif) no-repeat;
Correctbackground:#rgb(255, 255, 160) url(images/form_bb.gif) no-repeat;
Copy linkTweet thisAlerts:
@SaveSheepauthorDec 19.2007 — Unfortunately, using the technique you mentioned above made IE stop showing the background image all together.

Now i've figured out another way to do it so that it works right and that would be with the following
[code=html]
textarea.message {
background-color: #dcc9a7;
border:0px #dcc9a7 solid;
color: #78582f;
background:url(images/form_bb2.gif);
background-attachment:fixed;
background-position:-30px -21px;
font-family:Arial, Helvetica, sans-serif;
font-size: 12px;
width:204px;
height:91px;
padding:5px;
}
[/code]


However, that makes it look right in firefox, background-position: -36px -21px makes it look right in IE. How can i tell IE to use this position, and everybody else to use the other one?
Copy linkTweet thisAlerts:
@ray326Dec 19.2007 — Attachment and repeat are completely distinct stylistic attributes. Are the Microsoft hacks so bad that they think fixed attachment is the same as no repeat?
×

Success!

Help @SaveSheep spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...