473,756 Members | 2,996 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

image rollover plus active state - possible?

28 New Member
Hello,

I have a test site running at http://artbymichaelkin g.com/DS/

As you can see with the navigation I have the image rollover. I do this with CSS via:

Expand|Select|Wrap|Line Numbers
  1. .companyrollover a{
  2.     display: block;
  3.     width: 95px;
  4.     height: 20px;
  5.     background: url(images/menubar/COMPANY.jpg) no-repeat;
  6.     text-decoration: none;
  7.     float: left;
  8.          }
  9.  
  10. .companyrollover a:hover {
  11.     background-position: -95px 0;
  12.            }
  13.  
  14. .companyrollover a:active {
  15.     background-position: -95px 0;
  16.     }
  17.  
Basically, the image is 190px wide and has two images in it, on the left is the non select image and the other is the selected image. On roller it just shift the red one into view.

However, I CANNOT get it to stay red after one clicks in a certain area.

As you can see from my code, I tried 'a:active' but that does not work.

Does anyone know how to make the rollover stay on the red version after it is clicked?

Cheers,

Michael
Mar 7 '08 #1
8 3252
drhowarddrfine
7,435 Recognized Expert Expert
Did you try a:visited?
Mar 7 '08 #2
mrking
28 New Member
Did you try a:visited?
Just tried it.

It works in that it will show the rolled over image I want after it is clicked, however it constantly shows after others are clicked as well.

Is there a way to revert it to the original image state once another menu link is selected?
Mar 7 '08 #3
drhowarddrfine
7,435 Recognized Expert Expert
Now you've gotten into javascript land.
Mar 7 '08 #4
mrking
28 New Member
Noooooooooooooo ooooooooooooooo ooooooooooooooo ooo

:)

Thanks for the info.
Mar 7 '08 #5
AutumnsDecay
170 New Member
Or, for each page, have the respective link colored red (in Photoshop).

Example, on home page load "company_pic_re d", "xx1_pic_norm", "xx_pic_nor m", "xx2_pic_no rm", etc..

However, when they click on the image for xx1 (bringing it to xx1.html), have the following pattern:

"company_pic_no rm", "xx1_pic_red"," xx_pic_norm", "xx2_pic_no rm", etc..

I know it's not explained very well, but if you can comprehend what, exactly, I'm aiming for, than you're golden! All it is is editting a FEW files in Photoshop (or an image edittor of your choice).
Mar 7 '08 #6
mrking
28 New Member
Yup, I understand what you are doing but my site is made with php and css using Wordpress - yes, not the best for custom work......

and it will always call the same 'navbar' in for every page.
Mar 7 '08 #7
mrking
28 New Member
Now you've gotten into javascript land.
Just wanted to drop by and say you don't need to use javascript at all to complete this.

I did get it working perfectly with CSS. If anyone needs the solution you can PM me.
Mar 29 '08 #8
edallmighty
2 New Member
Hello,

How did you accomplish this? I"m going crazy trying to figure it out. I'm only using 2 buttons but they direct to content in an iframe so there are no additional pages to have different active clicked classes.

Thanks!!
Jan 17 '12 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1680
by: mrb | last post by:
Is it possible to rollover an image in one table and create an effect in another table? I've looked all over for an answer to this but seem to be unable to find an answer. I want to be able to rollover the thumbnails down the right and have the corresponding larger image in the middle (also, if the mouse is not over any of the images for the middle to be blank)
9
7625
by: MrBaseball34 | last post by:
I have a rollover menu at this link: http://www.amishmkt.com {Site is still under construction} How would I make it so that when you are on one of the pages, the background is highlighted like in this graphic: http://www.amishmkt.com/images/js_menu.gif i.e. When you navigate to the Entertainment Centers link, it
15
3097
by: Applebrown | last post by:
I've got a couple of errors on my site that I'm not sure how to fix. I'm using simple CSS for both text rollovers and my horizontal navbar, and here's what happens. First, the site: www.sunbadgeco.com/sunmetal/index.htm #1 { In IE6, rolling over an image in the navbar makes it "light" up. Clicking on the image takes you to another page (which is not finished). Then clicking the Back button keeps the image you just clicked on "lit" up,...
2
2457
by: CK | last post by:
Hello All, I am trying to extend the default asp:ImageButton to include an image for an enabled state and a second image for a disabled state. I currently did this by extending the ImageButton class in a custom control, creating a property for each of these images (EnabledImageUrl, DisabledImageUrl) and then overrode the Enabled property to change base.ImageUrl respectively. I am also trying to use Themes with this web site. The problem...
7
2461
by: simchajoy2000 | last post by:
Hi, I am just a javascript beginner so maybe this is a simple problem but I am trying to do some rollovers on images in a separate <div>. Here is the relevent piece of my code: <html> <head> <script type="text/javascript"> if (document.images) {
1
3345
by: twst3d | last post by:
Thanks in advance. Not very well versed in javascript but I'm pretty good at piecing together code that works. I am creating a page that has will have definitions on one side and a blank area below and to the right. What I want to happen is for the words to be highlighted on rollover but then I want the definition of the word plus an image to appear on click. I have a semi functional version working now at...
2
3442
by: Casimir | last post by:
I am looking into making pure CSS image rollovers. Do you have any clever (and robust) CSS rollover-tricks? Or links to such "in the wild"? I have figured out two methods for this, but have yet to do proper testing on browser support. Method I:
2
1581
by: mrking | last post by:
Before I go ahead and implement this I need to confirm that what I want can be done. The standard image rollover works well, however this time I want to modify it to show the current selected button as the rollover would be until the next menu item is clicked. IE, lets say I have two buttons Company Contact non active state has the image text in grey, rolled over image text is red.
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10014
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9844
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7226
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.