Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to set element input background color in Safari



Hi Lee

I have been attempting this very same thing this week, I have been unable to get the background colour of the text input box to work in Safari either. In fact it is the only browser that I have tried that doesn't display the colour - Firefox .9, IE 5 & 6, Netscape 7 on Windows & Mac all display the color. This doesn't work with a image applied to the background of the form either.

Cheers
Gary

-------------------------------------------
http://www.universalwonderland.com


On 23/06/2004, at 5:30 AM, Lee Carmichael wrote:

Hello Everyone,

I am having a problem changing the background color of
a html input element (type=text) with either a style
sheet and class or in javascript with the
document.<form>.elements["name"].style.backgroundColor
= "red";. It seems that a couple of source (non-really
official) claim that changing the background color or
font color of a input is disallowed by Safari due to
look and feel issues.

Can anyone confirm or deny this or do I need to do
some different magic like using a special property?

Here is a HTML snippet that works on IE, Netscape but
not Safari to illustrate what I'm struggling with:
(only html and css here)

<html><head>
<title> test Form stuff </title>
<style type="text/css">
    .formerror { background-color: red; color: black;
}
</style>

<body>
<form name="joebob">
<table border=0 cellspacing=4 cellpadding=4>
<tr><td> element dos (class=formerror): </td>
        <td><input type="input" class="formerror"
size=20 name="test2"></td></tr>
</table>
</form
</body>
</html>



Thanks,

Lee



__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.


References: 
 >Unable to set element input background color in Safari (From: Lee Carmichael <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.