GetDotted Domains

Viewing Thread:
"CSS File Input"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sat 12/02/05 at 10:59
Regular
"NULL"
Posts: 1,384
I've got a nicely themed site and all is well except for one minor CSS issue. All the buttons and input boxes on the site are themed, except for the file input boxes.

How do I style these with CSS? My CSS at the moment is:

input, textarea {
border-width: 1;
font-family: Arial;
font-size: 12px;
padding: 2px;
border-color: #CCCCCC;
border-style: solid;
background-color: #F9F9F9;
color: #999999
}

and its a
Sat 12/02/05 at 16:16
Regular
Posts: 10,364
Tyla wrote:
> input:focus [type=text] {}, which can be seen here on a current
> client on the search box when you click into it
> [URL]http://www.cla.preview.cayenne.co.uk/[/URL]

Heh thats awesome!

Shame about IE incompatability mind.
Sat 12/02/05 at 12:26
Regular
"l33t cs50r"
Posts: 2,956
Nimco wrote:
> It still won't let me customise the style of the Browse button - it's
> worked on the text-box associated with the file input though! Cheers.

input [type=button] should do the job.

or

input [name=xxx]
input [id=xxx]

The joys of selectors

My current fave is

input:focus [type=text] {}, which can be seen here on a current client on the search box when you click into it
[URL]http://www.cla.preview.cayenne.co.uk/[/URL]

Again though, doesn't work in IE
Sat 12/02/05 at 12:25
Regular
"l33t cs50r"
Posts: 2,956
Tyla wrote:
> There is a more hardcore approach by creating cutom DTD declarations
> (the whole pointof xHTML) and generating custom handlers for each
> element!;)

Great article: http://www.alistapart.com/ articles /scripttriggers.
[remove spaces at the damn URL input here still goes ape for some odd reason!]

Not for the faint hearted as customising xHTML DTD's is a mare unless you understand XML/xSLT and how to create a DTD in the first place.

BUt thats the whole pointof "extensible" HTML (xHTML) which is often over looked.
Sat 12/02/05 at 12:24
Regular
"NULL"
Posts: 1,384
It still won't let me customise the style of the Browse button - it's worked on the text-box associated with the file input though! Cheers.
Sat 12/02/05 at 12:21
Regular
"l33t cs50r"
Posts: 2,956
cjh wrote:
> Tyla wrote:
> Other wise, it;'s either the MSIE7 approach.

>
> Would that be this thing ([URL]http://dean.edwards.name/ie7/[/URL])
> or something else?

That's it. Still working with it here, but does fix all the errors in IE with CSS and DOM and all serverside JS too which prevents the whole usability od JS thing. Even corrects the Alpha PNG issue without using all those annoying hacks!
Sat 12/02/05 at 12:20
Regular
"It goes so quickly"
Posts: 4,083
Tyla wrote:
> Other wise, it;'s either the MSIE7 approach.


Would that be this thing ([URL]http://dean.edwards.name/ie7/[/URL]) or something else?
Sat 12/02/05 at 12:16
Regular
"l33t cs50r"
Posts: 2,956
Specific styling of input elements is simple... apart from the fact IE doesn't support it, but besides that (although it's standard CSS2):

input [type=text] {}
input [type=submit] {}
input [type=textarea] {}
input [type=file] {}

To get more speciifity

#id input [type=element] {}

Other wise, it;'s either the MSIE7 approach or creating classes for each element in the form.

There is amore hardcore approach but creating cutom DTD declarations (the whole pointof xHTML) and generating custom handlers for each element!;)
Sat 12/02/05 at 11:34
Regular
"Pouch Ape"
Posts: 14,499
*bows for Lord Tyla's arrival*
Sat 12/02/05 at 11:28
Regular
"NULL"
Posts: 1,384
I googled before I asked in here, but the problem is the word "file" when you're searching. It picks up anything about stylsheets cos the word "file" is so common! Argh!

I figured it might not be possible which is why I hadn't bothered with it before, and it's not much of a problem - I'm not gonna try some dodgy hack to make it look different.

I just thought someone might be able to say "oh, for that, you need to specify it like this...." and it would be simple. Ah well - let us await Lord Tyla.
Sat 12/02/05 at 11:24
Regular
"It goes so quickly"
Posts: 4,083
No doubt Tyla has more experience with this, but I believe it is a general problem, where browsers simply don't apply styles to this element.

I'm sure I've seen work arounds somewhere, but never bookmarked them, though a simple search on google / MSN should pop up any discussions regarding it.

Ah, here's one: [URL]http://www.quirksmode.org/dom/inputfile.html[/URL]

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Many thanks!
You were 100% right - great support!
Simple, yet effective...
This is perfect, so simple yet effective, couldnt believe that I could build a web site, have alrealdy recommended you to friends. Brilliant.
Con

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.