Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Directory Submission Service   I Sell Pagerank   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 01-06-2006, 05:52 PM   #1 (permalink)
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 1,453
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
CSS HOVER

I don't want people to laugh at me for this question, I'm sure it is really simple..

I want my mouse to change to a pointer when it hovers over any type of;

submit.
button.
reset.

So;

<input type="submit">

I would want to it change to a pointer when it hovers.

I can't work it out. I have tried

input:hover {
cursor: pointer;
}

but that changes for input type="text" which is bad because it will confuse people

I also tried;

submit:hover

and it doesn't work

Is there anything I can do without having to apply a class to each of my buttons?

Please let me know.

Cheers
Sketch is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 01-06-2006, 06:12 PM   #2 (permalink)
Inactive
 
Ricoool's Avatar
 
Join Date: 10-13-03
Location: wonderfull Copenhagen, DK
Posts: 1,256
iTrader: 0 / 0%
Latest Blog:
None

Ricoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to behold
Send a message via Skype™ to Ricoool
<input type="submit" style="cursor:pointer">

forget about hover

Quote:
Originally Posted by Sketch
I don't want people to laugh at me for this question, I'm sure it is really simple..

I want my mouse to change to a pointer when it hovers over any type of;

submit.
button.
reset.

So;

<input type="submit">

I would want to it change to a pointer when it hovers.

I can't work it out. I have tried

input:hover {
cursor: pointer;
}

but that changes for input type="text" which is bad because it will confuse people

I also tried;

submit:hover

and it doesn't work

Is there anything I can do without having to apply a class to each of my buttons?

Please let me know.

Cheers
Ricoool is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-06-2006, 06:13 PM   #3 (permalink)
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 1,453
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
Thanks Ricoool but I didn't want to have to go and change each button..Because it could take some time
Sketch is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-06-2006, 06:28 PM   #4 (permalink)
v7n Mentor
 
DaveyBoy's Avatar
 
Join Date: 10-13-03
Location: England.
Posts: 6,183
iTrader: 0 / 0%
Latest Blog:
None

DaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest order
find and replace :

<input type="submit">

with

<input type="submit" style="cursor:pointer">
DaveyBoy is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-06-2006, 06:40 PM   #5 (permalink)
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 1,453
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
I will do that if I have to, but some of my submits already have styles.

I am guessing there is no way to do it in the style sheet?
Sketch is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-06-2006, 07:24 PM   #6 (permalink)
Inactive
 
Ricoool's Avatar
 
Join Date: 10-13-03
Location: wonderfull Copenhagen, DK
Posts: 1,256
iTrader: 0 / 0%
Latest Blog:
None

Ricoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to behold
Send a message via Skype™ to Ricoool
<input type="submit" class="pointing">

input.pointing {
cursor: pointer;
+ whatever styles you have
}
Ricoool is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-07-2006, 12:20 AM   #7 (permalink)
Inactive
 
Michael Allison's Avatar
 
Join Date: 12-08-05
Location: Spokane, WA
Posts: 1,961
iTrader: 0 / 0%
Latest Blog:
None

Michael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web proMichael Allison is a highly respected web pro
Send a message via MSN to Michael Allison Send a message via Yahoo to Michael Allison Send a message via Skype™ to Michael Allison
input { cursor: pointer }



That should do it. I haven't tested it, but it should work for all your input fields.

-Michael
Michael Allison is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-07-2006, 08:25 AM   #8 (permalink)
Inactive
 
Ricoool's Avatar
 
Join Date: 10-13-03
Location: wonderfull Copenhagen, DK
Posts: 1,256
iTrader: 0 / 0%
Latest Blog:
None

Ricoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to beholdRicoool is a splendid one to behold
Send a message via Skype™ to Ricoool
Quote:
Originally Posted by Michael Allison
input { cursor: pointer }



That should do it. I haven't tested it, but it should work for all your input fields.

-Michael
If you do that all other form elements also get the hand, like text fields, not so good
Ricoool is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-08-2006, 03:45 AM   #9 (permalink)
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 1,453
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
Thanks guys,

Michael I had already tried that, and it did what Ricoool said, makes everything have the funny little hand.

I tihnk I will do what daveyboy said, come to think of it I haven't used "style" only "class" in my buttons so it should work fine

Cheers Everyone!
Sketch is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-08-2006, 11:48 AM   #10 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
Lightbulb

A more advanced method you are looking for is available, but not supported by all browsers.

On a side note I do not recommend using style="". Using class="" is preferable as it allows you to update all the relevant buttons by editing only one bit of CSS instead of many! (Don't forget you can also use multiple classes in an element by listing them separated by a single space character, e.g. class="classone classtwo classthree").

The more advanced method I mentioned would not be supported by all browsers, (especially old ones)...

In your CSS use the square brackets selector modifier something like this - [x=y] where x is an attribute name and y is the value it needs in order to be "selected" in the current CSS rule. You will still need to use a class for cross-browser compatibility (if you wish).
Code:
input[type=button], input[type=submit], input[type=reset], input.pointer { cursor:pointer; } <input type="submit" class="pointer">
This is CSS2 stuff so I'd guess only IE would require the class!
http://www.w3.org/TR/1998/REC-CSS2-1...bute-selectors
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt

Last edited by LazyJim : 01-08-2006 at 11:52 AM.
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-08-2006, 11:58 AM   #11 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
Incidently the :hover part is irrelevant!
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
2007 GWM hover ash1 Forum Lobby 1 03-05-2007 08:56 AM
CSS hover issues... downtroden Coding Forum 4 07-15-2004 11:03 AM
A:Hover Visited? SN3 Coding Forum 17 02-03-2004 04:58 PM
css image hover sornok Coding Forum 7 01-09-2004 12:29 PM
Forum Hover Pimpen 2010 Coding Forum 40 11-02-2003 09:44 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 09:12 PM.
© Copyright 2008 V7 Inc