Solved

CSS style to make form button look like normal

Posted on 2009-05-05
3
792 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

20 Experts available now in Live!

Get 1:1 Help Now