Browse button???

They have: 53 posts

Joined: Oct 2005

Hi all

I have been having problems regarding styling input areas, submit buttons etc.
I followed some people's advice in other forums and I managed to get it going.

Now, everything is working EXCEPT 1 : The "browse-for-a-file" button

I thought that this button, since it is coded as would be treated like the other input elements ,such as the buttons.
BUT THIS IS NOT HAPPENING!!!!!

Even if I change, for instance, font-size = 500px, the "Browse" button and the fonts inside the input area remain the same as without styling at all...

What am I missing here?
Sorry for asking so silly staff Sad

The Webmistress's picture

She has: 5,586 posts

Joined: Feb 2001

Do you have the page/css online so we can actually see what you are doing?

They have: 53 posts

Joined: Oct 2005

I'm using this for styling input elements:

input {
background-color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
}

But, as I have seen in other forums, people say the 'Browse' button can't be styled because it is somehow attached to the browser and not subject to changes.

The Webmistress's picture

She has: 5,586 posts

Joined: Feb 2001

It can be changed but you will have to create a class with your styling and then assign the class to the button

<style type="text/css">
<!--
.change {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
color: #00CC00;
background-color: #FFFFFF;
}
-->
</style>
 
'
<input name="Submit" type="submit" class="change" value="Submit" />
 
'

Julia - if life was meant to be easy Michael Angelo would have painted the floor....

They have: 53 posts

Joined: Oct 2005

Thanx, but I didn't have trouble in changing Submit or Reset buttons.
The problem appeared in Browse buttons, where the above CSS doesn't seem to apply..

The Webmistress's picture

She has: 5,586 posts

Joined: Feb 2001

What do you mean by browse button then?

He has: 698 posts

Joined: Jul 2005

They mean the button that shows up to upload a file. I did a little research, and there is no way to modify it with CSS. The only way to do it is with JavaScript, and it has been known to cause the form to not work, which pretty much negates the whole thing. Wink

Kurtis

Roo's picture

She has: 840 posts

Joined: Apr 1999

I notice that what you posted does not have a period in front of the class, is that just a typo on the board or is your actual css file lke that?

You have:
input
Instead of
.input

But that is really weird that you can't add a class to that certain button as mscreashuns says...

Roo

He has: 698 posts

Joined: Jul 2005

It's right without the period. That way, it will affect all tags. You can do this with TD, TR, TH, DIV, etc...

They have: 35 posts

Joined: Jun 2004

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.