Drupal: HTML Button on page to match theme
I've got a simple question to ask this time that I'm hoping has a simple solution;
I made a theme for my drupal website (using Artisteer) and now I want to create a page with a button on it that looks the same as my others, i.e: using the same css, and I just wondered how I could do that?
I've tried <html><input type="button" value="More Info..." class="art-button" /></开发者_Go百科html>
And I've also tried:
<html> <div id="art-button"><input type="button" value="More Info" /> </div>
But all they do is display a standard HTML button and not the one I styled in Artisteer. I'm fairly certain 'art-button' is the right thing to use but if anyone knows for certain what the style is I need to use please inform me.
So, if you could answer my question please I would appricate it!
Thanks In Advance,
Andy
PS I use openWYSIWYG to create my drupal pages if that makes any difference?!
Find a button on your page and view its source code. Telepathically attaching stylesheets doesn't work on SO, you'll need to quote the code next time for a more exact answer.
WYSIWYG editors don't make much difference, but make sure your input filters allow for the HTML you're trying to use.
BTW, don't use Artisteer. It occasionally likes to generate buggy code for buttons and you don't want surprises like that :).
When using buttons in Drupal you should set default CSS classes to them. If it is a submit button add
class="form-submit"
and if it is a normal button add:
class="form-button"
This default style in your current theme will be applied to your button.
精彩评论