Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > JavaScript and CSS

Vote on your favorite hash algorithm here!

JavaScript and CSS Extensible Markup Language, Java Script, and CSS questions here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-2007, 09:49 AM
CygnetGames's Avatar   
CygnetGames CygnetGames is offline
Programmer
 
Join Date: May 2007
Location: York, England
Posts: 113
Credits: 0
Rep Power: 6
CygnetGames is on a distinguished road
Default CSS Image rollover using inline CSS

I have a button on my website that pushes down when you roll over the image - very simple, it's implemented like this:
Code:
p.random-game-button a 
  { background-image : url('images/random-button-up.jpg'); }
p.random-game-button a:hover 
  { background-image : url('images/random-button-down.jpg'); }
The problem is, I want to put this button on a Squidoo lens.

But Squidoo only lets you use inline CSS, so things get implemented like this:
HTML Code:
<b style="font-weight:normal;color:#ff0000">red<\b>
So it's obvious how to style the hyperlink with the "up" image:
HTML Code:
<a style="background-image:url(images/random-button-up.jpg)"><\a>
But does anyone know how to access the :hover pseudo class of the hyperlink using inline CSS? (To style the "down" image.)

Or is there an alternative way to implement an image rollover in Squidoo? (Sadly, javascript isn't supported.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 09-06-2007, 10:24 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 7,364
Last Blog:
Tramp Variables
Credits: 1
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

I think that this may work:

HTML Code:
onmouseover="this.style='background-image : url('images/random-button-down.jpg');'
So your code would look like this:

HTML Code:
<a style="background-image:url(images/random-button-up.jpg)"  onmouseover="this.style='background-image : url('images/random-button-down.jpg')'"><\a>
Let me know if this works. I didn't test it.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-07-2007, 05:54 AM
CygnetGames's Avatar   
CygnetGames CygnetGames is offline
Programmer
 
Join Date: May 2007
Location: York, England
Posts: 113
Credits: 0
Rep Power: 6
CygnetGames is on a distinguished road
Default

Quote:
Originally Posted by Jordan View Post
Let me know if this works. I didn't test it.
Thanks for the idea, but unfortunately it doesn't work.
Squidoo removes the "onmouseover" attribute as the contents of it are javascript, and they don't let people use javascript for security reasons.

I cross-posted this question on the squidoo forums but have only got a reply of "Hmm... I don't think so." so far.

This might be a bit of a puzzle...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB 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
How to make image straight - Photoshop ahsan16 Photoshop Tutorials 56 07-30-2008 03:11 PM
JavaScript:Tutorial, MouseOver Image Change TcM Javascript 2 10-30-2007 01:51 PM
Resize Images And Maintain Original Sharpness AfTriX Photoshop Tutorials 7 04-20-2007 09:55 AM
PHP Image NeedHelp JavaScript and CSS 1 04-20-2007 09:00 AM
Resize an Image Blaze C# Programming 3 09-22-2006 06:58 PM


All times are GMT -5. The time now is 11:24 AM.

Contest Stats

Xav ........ 1335.07
MeTh0Dz|Reb0rn ........ 1059.99
morefood2001 ........ 898.18
John ........ 887.37
marwex89 ........ 875.28
WingedPanther ........ 864.22
Brandon W ........ 764.23
chili5 ........ 312.39
Steve.L ........ 256.16
dcs ........ 231.11

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 83%

Ads