开发者

Browser-populated form input text gets styled differently, makes input fields unreadable

I'm working on the my site which is done with a black background. I've changed the coloring on the form input fields. However, when I return to a page with saved text in a field, the background color becomes white, and the text color stays a light color (grey) and thus becomes somewhat unreadable.

e.g.

input{
    background-color:black;
    color:white;
}

Presumably there is some way to style this "text that is pre-populated by the browser based on previous responses", but I don't know what css allows access to it, or what it would be called to search for it.

Tried: Searching through the css pseudo-classes, google searchin开发者_运维百科g through form styling tutorials, etc. Browser inspecting the form elements for relevant user-agent css, nothing.

Point me in the right direction?


This is a browser behavior, and I don't believe it can be controlled via CSS.


The file input element is a bitch to customize. There are workarounds but they involve a lot of hackery. If you really need to customize the look and feel of your fields, try a flash based uploader like SWFUpload or Uploadify.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜