CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 26th, 2004, 05:48 AM
mzlatovi mzlatovi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 3 mzlatovi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How to create CSS rule that applies ONLY to INPUT element which type is SUBMIT

So, what would I like to have?

A css rule that would affect visual appearance of only the <input type="submit"> elements (or any other sub-type of <input>, but again, affecting that sub-type only).
Is it possible to do? How?

I have a lot of .NET pages with a LOT of submit buttons (within datagrids and regular buttons too). There is a way to do it programaticaly in source code of .NET pages, but I'd like an elegant solution like css, which could be done without recompiling entire project.

Any help is highly appreciated.

Reply With Quote
  #2  
Old July 26th, 2004, 06:42 AM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,715 Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 16 h 43 m 11 sec
Reputation Power: 642
you can use attribute selectors

input[type=submit] {
border:1px solid #000;
}

http://www.w3.org/TR/CSS21/selector...ibute-selectors

but ofcourse this does not work in msie,
work in every other modern browser mozilla, opera, safari.

Reply With Quote
  #3  
Old July 26th, 2004, 07:55 AM
mzlatovi mzlatovi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 3 mzlatovi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks a lot, that solves the part of the puzzle. But what about IE? No such elegant (or less elegant) way?

Reply With Quote
  #4  
Old July 26th, 2004, 10:51 AM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,659 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 11 h 53 m 47 sec
Reputation Power: 687
You could, of course, browser-sniff and tell folks with IE to upgrade to a modern browser. Hmmm, that sounds familiar . Since you're in a .NET environment, I doubt that's a popular or satisfactory solution.

Use a class definition and apply the class to each input[submit]. Not pretty, but a search and replace should make it relatively painless.

cheers,

gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

My html and css workshop, demos and tutorials.
Ask a better question, get a better answer.

Reply With Quote
  #5  
Old July 27th, 2004, 07:40 AM
mzlatovi mzlatovi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 3 mzlatovi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by kk5st
You could, of course, browser-sniff and tell folks with IE to upgrade to a modern browser. Hmmm, that sounds familiar . Since you're in a .NET environment, I doubt that's a popular or satisfactory solution.

Yes, not very satisfactory solution indeed

Quote:
Originally Posted by kk5st
Use a class definition and apply the class to each input[submit]. Not pretty, but a search and replace should make it relatively painless.

Well, I'll delve into the dark depths of the .NET framework and try to do it as painless as possible. An idea or two are already brewing inside my mind

Thanks guys,

Miran

Reply With Quote
  #6  
Old July 27th, 2004, 10:51 AM
Cuda Cuda is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Houston, Texas for now
Posts: 59 Cuda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 59 m 32 sec
Reputation Power: 5
Send a message via ICQ to Cuda
I think this would work for you. Just need to give each submit button a class attribute.

Code:
<style type="text/css">
.submit
{
border:1px solid #000;
}
</style>

<body>
<input name="submit" type="submit" class="submit">
</body>


Hope that helps,
Cuda

edit ---> Sorry didn't see this already sugested my bad.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > How to create CSS rule that applies ONLY to INPUT element which type is SUBMIT


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT