Solved

CSS style to make form button look like normal

Posted on 2009-05-05
3
791 Views
Last Modified: 2012-08-13
I'm supplying the code for a simple form for another department to add to one of their web pages.
The problem is, they've code some mass-complicated css going on and it's making the buttons look like black text on an orange background (which is how they've set it up for other forms on their website with a "INPUT[type=button]" definition)  I want my button to look "normal"  So I can override their style sheet with some inline css
like this:
<input type="button" name="one" value="1" style="xxxxxxx" />

Problem is, I can't figure out how to 'style' a button to look like the defaults of a form button without using images.
Can anyone help, even getting me close would be great.

Thanks!
0
Comment
Question by:dban00b
3 Comments
 
LVL 1

Accepted Solution

by:
salamay earned 250 total points
ID: 24308843
Hi,

Try This

.specialbutton
{ border: font-size: 11px; color: #FFFFFF; font-weight: normal; font-family: arial; background-color: #CC0000; text-decoration: none;
}

<input type="submit" value="Submit form" class="specialbutton">

Hope it works
Salamay
0
 
LVL 3

Assisted Solution

by:mharfouch
mharfouch earned 250 total points
ID: 24310028
You should use an ID, not a class.

You just need to insert this where you want the button in the code:

<input type="submit" value="submit" id="button">

and this somewhere in the css:

#button {
      font-size:10px; background-color:#CCC;
}

And there you go. A little "normal" button.
0
 
LVL 1

Author Comment

by:dban00b
ID: 24315609
Neither of those look quite like the default button, but at least it gets me away from the hideous 'messed' up button they put on their entire site.
Thanks.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now