MyBB Community Forums

Full Version: how do you change the "browse for attachments" input button background colour??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
heya ^_^

i'd like to change the background colour, font size & weight of the "browse..." button (for attachments in the editor) since i have already changed it for every other button i can find right now on the forum i am creating. after everything i try in the css i only manage to change the background colour of the text field next to the button. how do i change css of this button?? i'd preferably like to change every button with the "fileupload" class cuz i think that there is more than 1. please help!!

Thank youuuu!!!! Smile
You can use .fileupload class and then add attributes to it (e.g. like the one provided below) in global.css. Just you've to use the class="fileupload" in the <input > button tag.

.fileupload{
color: #000000;
background-color: #969696;
border-radius: 3px;
padding: 1px 5px;
}
@Yaldaram thanks for the reply ^_^ unfortunately, this won't work cuz it only changes the colour of the text field next to the "browse" button. i've done some digging & i read that it's impossible to change the colour of this button since it's generated by windows & not the browser. is this accurate??
You can change the color. You probably needs to find the correct <input> tag that is associated to that button.
hey @yaldaram, nah, it doesn't look like i can do this. a quick search on google for something like "change background input type=file" will tell you this. if you assign a class to this button & use that as the css selector, it changes the text field not the button. if you just use "input" as the css selector, it changes the text field not the button. if you "span" a class around the "input" & use ".class input" as the css selector, it changes the text field, not the button. i'll do some more digging on this & let you know if i come up with anything. apparently it's because the button is generated by windows it's self, & not the browser.
===================================
i'm reading some interesting things about it >> here <<. you should check this out.
@BleepyEvans shot dude!! sounds like a mess to me, but i'll give it a shot sometime & fill you in. i'd go for the straight up html/css solution cuz i don't know enough javascript to mess around with anything if anything needs messing around with at some point for example when v2 of mybb comes out. rad, thanks dude Smile