MyBB Community Forums

Full Version: CSS styling
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi whilst styling the form input buttons with CSS I realised that not all buttons follow this style. I see a few that are the original style such as submit types etc..

Is there a way to give these buttons the same style as the rest?

thanks.
I'm sure other mybb theme designers have come across this problem before?
Make sure you add the correct class tag to the button.
For example, for a checkbox, you would write something like:
<input type="checkbox" name="myname" value="myvalue" class="checkbox" />

Note the class attribute.
yes but that would require going through all mybb php files Sad
Well, firstly, the HTML code is stored in templates, not in the PHP files.

All the default templates have the class attribute correctly set. If you've installed some plugins though, they may not have the class attribute correctly set.
Unfortunately, this probably means that you'll have to find every instance where there isn't the attribute set. If you don't have many modifications, this shouldn't take long though...
I have looked at the code myself and there are some buttons such as sumbit with a class!
And no it is a fresh install so no plugins are installed.
By default, all templates will have the class="button" attribute set to them.

If you notice buttons not confirming to the style you've changed them to, can you point them out here so we can get it fixed?
yeah sure
Here's a few I've found using my theme.
Its on the post reply page > attachments.

<td colspan="3" style="white-space: nowrap;"><strong>New Attachment:</strong> <input name="attachment" size="30" type="file">

<!-- start: post_attachments_attachment_postinsert -->
<input name="insert" value="Insert Into Post" onclick="clickableEditor.insertAttachment(1);" type="button">
<!-- end: post_attachments_attachment_postinsert -->

I will post more as I come across them.
The new attachment input box cannot be styled as browsers do not allow it to be - for security reasons.

The insert in to post one, however, can be fixed.

Chris