473,503 Members | 2,163 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 1817
In article <do************@mail.forum4designers.com>,
domeceo <do************@mail.forum4designers.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.html">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
3434
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...
3
1520
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...
12
8484
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...
1
16073
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...
1
1853
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 { .......
5
4162
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....
47
7552
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...
6
3174
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...
2
2787
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...
1
1777
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...
0
7093
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...
0
7287
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,...
0
7349
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...
1
7008
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...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
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,...
0
3177
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...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
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 ...

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.