473,659 Members | 3,592 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

rollover effect


I'm currently in the process of replacing a few rollover images, use
for anchors, with text. I know how to change the hover and link colo
attribute for all <a> hyperlink tags, but I don't want to change the
all. How can I set hover and link attributes for a class

domece
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message44657.htm

Jul 20 '05 #1
1 1823
In article <do************ @mail.forum4des igners.com>,
domeceo <do************ @mail.forum4des igners.com> wrote:

I'm currently in the process of replacing a few rollover images, used
for anchors, with text. I know how to change the hover and link color
attribute for all <a> hyperlink tags, but I don't want to change them
all. How can I set hover and link attributes for a class?


a.class:hover { property: attribute; }

If there's several anchor tags together that you want to replace (like
a menu), you can include them in a single div and set the attributes
like that.

For example (from a current project of mine):

..nav a {
padding: 2px 10px;
color: #f00;
background-color: #ff0;
font-family: Arial, Verdana, sans-serif;
font-weight: bold;
text-decoration: none;
}

..nav a:visited
{
color: #f00;
}

..nav a:hover, .nav ul li a:active
{
color: #ff0;
background-color: #f00;
}
Then the HTML is something like:

<div class="nav">
<a href="one.html" >First</a>
<a href="two.html" >Second</a>
<a href="three.htm l">Third</a>
</div>

--
lkseitz (Lee K. Seitz) .at. hiwaay @dot@ net
"From there to here, and here to there, funny things are everywhere."
-- Dr. Seuss, _One Fish, Two Fish, Red Fish, Blue Fish_
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3445
by: Brian Angliss | last post by:
I'm relatively new to scripting in JavaScript, so I'm not too surprised I'm having difficulty scripting up an animation effect for my personal site. What I'm trying to do is the following: When I go onMouseOver on a button in a nav bar, I want that button to switch to a different image while at the same time another blank image changes as an animation to an associated image. When I go onMouseOut, the bar image reverts back to the...
3
1529
by: Chris Fowler | last post by:
Hi All, I have a question which will probably have a simple answer, but it is one that has eveaded me until now. I want to create a rollover navigation bar which does not inviolve images. I can produce it in Dreamweaver but any text that appears on the buttons comes out blurred on the page - even if the image resolution is high etc. I think I can produce the same effect, but using css and client-sdie JavaScript, but am making a mess of...
12
8497
by: Kyle James Matthews | last post by:
Hello, I have been lurking here for a little bit (truth be told, I lurk on too many newsgroups to be truly effective). I have made a CSS rollover menu, and would like some advice. The menu is at the URL http://www.digitalovertone.com/index3.php. You will notice that the each link disappears the first time you hover over it (this is most noticable in Opera, in my experience). Each link consists of 2 images (1 for a:hover, 1 for...
1
16082
by: nick | last post by:
I have the following code: <style> #item1 { DISPLAY: block; BACKGROUND: url(ProjMenuImgs/ProjBtn.gif) no-repeat 0px 0px; WIDTH: 87px; HEIGHT: 94px; } #item1:hover { background-position: 0 -92px; }
1
1864
by: DM | last post by:
For the sake of anyone doing a Google Groups search who encounters this bug and is looking for a workaround, I wanted to post what I've found. If you have pseudo class selectors... a { .... } a:hover { ....
5
4177
by: Bribro | last post by:
I have an horizontal menu with a dreamweaver-generated rollover effect. Images are png and their transparency is handled by pngfix.js In IE, applied the pngfix, the rollover doesn't work at all. Obviously, if I cut the pngfix the rollover works fine but the transparency of images is gone. Can anybody help me? Thanks.
47
7598
by: Lauren Quantrell | last post by:
I have constructed the following code that simulates the common rollover effect when moving the mouse over a label (this example makes the label bold.) I'm wondering if anyone has come up with a better solution. lq 'start code:
6
3181
by: AJBopp | last post by:
I'm wrestling with CSS variations between Firefox and IE. I'm trying to create rollover buttons in a menu frame. It is working perfectly in Firefox but in IE only the first button is properly highlighted and linked. The second button, has only a partial "hit area" at the top of the image, although if you click the link, you can see the link border is properly place around the image. The rest of the buttons have no rolloever state or link...
2
2791
by: Rob Roberts | last post by:
I am trying to figure out a way to add onmouseover and onmouseout events to ButtonFields in a GridView in order to give them a rollover effect, but so far I haven't been able to figure out a way to do it. Does anyone know how to do this? Thanks in advance, --Rob Roberts
1
1784
by: john_aspinall | last post by:
Im trying to create a rollover effect for my navbar, but as usual, IE is screwing things up! Everything is fine in Firefox (as usual!) but IE seems to be stretching the elements to the end of the page when I Hover over. http://www.ainewmedia.co.uk/index.asp ul#navList li a:link, ul#navList li a:visited { font-family:"Trebuchet MS", Verdana, Arial; font-size:14px;
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8337
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
8851
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...
1
8531
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
7359
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
6181
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
4175
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...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2754
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

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.