Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Applying Css on input button

Reply
Thread Tools

Applying Css on input button

 
 
Von Shean
Guest
Posts: n/a
 
      05-28-2004
I want the buttons in my application to have a different background color.
I have tried the following ways of delaclarations in css that did not work
for me


input.button.
{BACKGROUND: #d6e7ef}

input[type=button]
{BACKGROUND: #d6e7ef}


I have IE6.

Is there anyway i can apply application wide change to input buttons
button's background.

Thank you.


 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      05-28-2004
in post: <news:(E-Mail Removed) ws.com>
Von Shean <(E-Mail Removed)> said:

> I want the buttons in my application to have a different background color.


be aware that browser support varies a lot with form elements and/or
browser options may disallow your style suggestions.

> input.button.
> {BACKGROUND: #d6e7ef}


you have a period after the 'n' and i suspect you haven't given the
input the 'button' class:

<input type="button" ... class="button">

a better class name would be appropriate

> input[type=button]


attribute selectors are not supported by IE

> I have IE6.


it doesn't matter what you have but what your visitors have.

> Is there anyway i can apply application wide change to input buttons
> button's background.


give them all the same class or ignore crappy IE and use an attribute
selector.

--
b r u c i e


 
Reply With Quote
 
 
 
 
Von Shean
Guest
Posts: n/a
 
      05-28-2004
Thank you for the quick reply
Actually what i am trying to avoid is

<input type="button" ... class="button">
-------------------------^^^^^^^^^^------

I am trying to avoid the change in the complete application. Is There a way
around it.

Thanks

"brucie" <****@bruciesusenetshit.info> wrote in message
news:(E-Mail Removed)...
> in post: <news:(E-Mail Removed) ws.com>
> Von Shean <(E-Mail Removed)> said:
>
> > I want the buttons in my application to have a different background

color.
>
> be aware that browser support varies a lot with form elements and/or
> browser options may disallow your style suggestions.
>
> > input.button.
> > {BACKGROUND: #d6e7ef}

>
> you have a period after the 'n' and i suspect you haven't given the
> input the 'button' class:
>
> <input type="button" ... class="button">
>
> a better class name would be appropriate
>
> > input[type=button]

>
> attribute selectors are not supported by IE
>
> > I have IE6.

>
> it doesn't matter what you have but what your visitors have.
>
> > Is there anyway i can apply application wide change to input buttons
> > button's background.

>
> give them all the same class or ignore crappy IE and use an attribute
> selector.
>
> --
> b r u c i e
>
>



 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-28-2004
"Von Shean" <(E-Mail Removed)> wrote:

> Thank you for the quick reply


You could express your gratitude better by complying with Usenet
netiquette, like adequate quoting.

> Actually what i am trying to avoid is
>
> <input type="button" ... class="button">
> -------------------------^^^^^^^^^^------
>
> I am trying to avoid the change in the complete application. Is There
> a way around it.


(So you actually knew _a_ solution but did not bother mentioning it, and
the CSS code you actually use now is different from what you posted.)

With the implicit conditions, no. IE just does not support attribute
selectors, period. Well, under some circumstances, you might be able to
save some class attributes by using them on enclosing elements and using
simple contextual selectors (which are well supported). But you gave
absolutely no information about the situation as a whole, such as a URL,
so you have deprived us of real possibilities of helping you there.

By the way, according to statistics, 99.8 % of all attempts to change
form field appearance are based on misunderstandings, and they really
hurt when they "succeed". Just let buttons be buttons, mm'kay? (According
to statistics, 96.9 % of all percentages have just been made up, but
98.7 % of peple take them seriously anyway.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
shlover143 shlover143 is offline
Junior Member
Join Date: Jun 2010
Posts: 1
 
      06-22-2010
Try Out this.....

<style>

input .classname { background-color:#000000; }

</style>

<html>
<body>
<input type="button" class="classname" value="button">
</body>
</html>

If you satisfied visit my site
magic-pitara.blogspot.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Applying onscroll to an <input> tag in FF bizt Javascript 3 09-02-2009 06:09 PM
Applying CSS style to dynamically generated XML galpi@mail.com Java 1 08-13-2006 08:07 PM
Applying CSS Styles to Dropdownlist =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?= ASP .Net 4 05-15-2006 02:16 PM
Applying CSS to HTML Control Programatically Prakash ASP .Net 6 11-09-2005 05:32 AM
CSS: Span not applying text-color attribute Noozer HTML 2 09-26-2004 04:28 PM



Advertisments