Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2006

Tip: Looking for answers? Try searching our database.

CSS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arne Garvander - 28 Apr 2006 15:45 GMT
Is there a news group for CSS?
I can set the style for INPUT but I don't have a good way of cascading a
style for all my <input type=button>. I have hundreds of them.
INPUT
{
   FONT-SIZE: 11px;
   COLOR: #000000;
   FONT-FAMILY: Arial, Verdana
}
INPUT button
{
   FONT-SIZE: 11px;
   COLOR: #ffffff;
   FONT-FAMILY: Arial, Verdana;
   background-color: #ffcc99;
}

Signature

Arne Garvander
Certified Geek

Kevin Spencer - 28 Apr 2006 16:48 GMT
CSS 2 defines an attribute selector:

INPUT [type=button]

However, I know of no browsers that support this. Instead, I'm afraid you'll
have to use a class:

INPUT
{
   FONT-SIZE: 11px;
   COLOR: #FF0000;
   FONT-FAMILY: Arial;
}
INPUT.alt
{
   FONT-SIZE: 12pt;
   COLOR: #00ffff;
   FONT-FAMILY: Arial, Verdana;
   background-color: #ffcc99;
}

(NOTE: I changed the inner styles so I could see the differences better)

I know it's a pain to have to add a class to all input elements that are
buttons, but there you are. In addition, you can use this class on other
input types if you want them to have the same style.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

> Is there a news group for CSS?
> I can set the style for INPUT but I don't have a good way of cascading a
[quoted text clipped - 12 lines]
>    background-color: #ffcc99;
> }
Arne Garvander - 28 Apr 2006 17:03 GMT
Kevin,

Thanks for the answer.  How do you become a Professional Numbskull?

Signature

Arne Garvander
Certified Geek

> CSS 2 defines an attribute selector:
>
[quoted text clipped - 39 lines]
> >    background-color: #ffcc99;
> > }
Kevin Spencer - 28 Apr 2006 23:14 GMT
> Thanks for the answer.  How do you become a Professional Numbskull?

Actually, I'm a Most Valuable Professional Numbskull, but I try not to
flaunt it. ;-)

Interesting that you should ask. My wife bought me a 3 Stooges t-shirt for
my 50th birthday. One of the things I really liked about it was a disclaimer
that said (in part) that the stunts should not be attempted, as they were
done by "Professional Numbskulls." I liked the sound of it, so I "borrowed"
it!

Signature

Nyuck Nyuck Nyuck,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

> Kevin,
>
[quoted text clipped - 45 lines]
>> >    background-color: #ffcc99;
>> > }
Chris Chilvers - 29 Apr 2006 03:26 GMT
>However, I know of no browsers that support this. Instead, I'm afraid you'll
>have to use a class:

Firefox supports it as I've played with it in the past (it also supports the :hover psedo element on any tag).
Unfortunatly most of the world uses IE which is still to bring in CSS2 support, then you can't rely on people having an
uptodate browser. So it's a few more years yet before we can start using this syntax.
Kevin Spencer - 29 Apr 2006 13:19 GMT
I couldn't get FireFox to support it on an input element.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

>>However, I know of no browsers that support this. Instead, I'm afraid
>>you'll
[quoted text clipped - 6 lines]
> uptodate browser. So it's a few more years yet before we can start using
> this syntax.
Göran Andersson - 29 Apr 2006 17:27 GMT
> I couldn't get FireFox to support it on an input element.

Then you probably just mistyped something.

Ugly yellow button:

input[type="button"] { background: #ff0; }
Kevin Spencer - 30 Apr 2006 13:11 GMT
Hi Göran,

Very odd. I must have. Because yesterday I couldn't get it to work in
FireFox, but copying and pasting your code, as well as your code with the
quotes removed, works in FireFox!

Signature

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

>> I couldn't get FireFox to support it on an input element.
>
[quoted text clipped - 3 lines]
>
> input[type="button"] { background: #ff0; }

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.