473,583 Members | 3,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hover emulating in IE

Hello.

How can simple emulating in IE this class ?

..example:hover {
border: 1px solid #696969;
}

Greets,
Cezar.
Jul 20 '05 #1
10 3718
Cezar wrote:
How can simple emulating in IE this class ?
Sorry, I cannot quite grasp what you're asking. Can you try rephrasing
it in clearer words?
.example:hover{
border: 1px solid #696969;
}


This looks correct; what is the problem you are having? Are you trying
to create hover styles on something other than an <a> element?

By the way, it's best not to *add* a border on :hover. Consider
changing only the border color on :hover.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2
On Tue, 15 Jun 2004 02:28:43 +0200, Cezar <ce*****@imail. net.pl> wrote:
Hello.

How can simple emulating in IE this class ?

.example:hover{
border: 1px solid #696969;
}

Greets,
Cezar.


If I'm right, you want to get :hover to work in IE on elements other than
<a>. You'll need to use something like Javascript to do this.
Jul 20 '05 #3
Neal <ne*****@yahoo. com> wrote:
If I'm right, you want to get :hover to work in IE on elements other
than <a>. You'll need to use something like Javascript to do this.


Yes, manipulating the element's style in Javascript, e.g.

<style type="text/css">
..example { border: solid 1px white; }
</style>
<script type="text/javascript">
function setborder(elem, color) {
elem.style.bord erColor = color; }
</script>
....
<p class="example"
onmouseover="se tborder(this,'# 696969')"
onmouseout ="setborder(thi s,'white')">
This is an example.</p>

(Naturally you get better advice on Javascript in
news:comp.lang. javascript and its FAQ.)

It would be possible, though hardly wise, to play some ugly tricks to
make e.g. a paragraph's entire text an <a> element (naturally assuming it
does not contain any real <a> elements) and to do your best to make it
_not_ behave as a link except for the purpose of :hover styling. E.g.,

<style type="text/css">
..example a { display: block;
background: white;
color: black;
text-decoration: none;
cursor: default;
border: solid 1px white; }
..example a:hover { border-color: #696969; }
</style>
<script type="text/javascript">
function setborder(elem, color) {
elem.style.bord erColor = color; }
</script>
....

<p class="example" ><a name="a42" href="#a42" tabindex="0">
This is an example.</a></p>

However it would still behave as a link in many ways, disturbing the
user. You could remove part of the problem by using an onfocus="..." and
onclick="..." attribute that try to prevent the element from getting
focus and to disable any clicking effects, but then you're on your way to
using more Javascript than you need for the relatively simple idea of
simulating :hover with Javascript.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #4
> Sorry, I cannot quite grasp what you're asking. Can you try rephrasing
it in clearer words?
.example:hover{
border: 1px solid #696969;
}


This looks correct; what is the problem you are having? Are you trying
to create hover styles on something other than an <a> element?

By the way, it's best not to *add* a border on :hover. Consider
changing only the border color on :hover.


This code not working in IE. That's why I ask for possible solution :-)

..buttons2{
background: #fafafa url(../pic/inputbg2.gif);
padding:0;
margin:0 0 0 6px;
cursor:pointer;
height:25px;
border: 1px solid #a9a9a9;
}
..buttons2:hove r{
border: 1px solid #696969;
}

Greets,
Cezar.
Jul 20 '05 #5
> If I'm right, you want to get :hover to work in IE on elements other than
<a>. You'll need to use something like Javascript to do this.


Yes, You right. So, I have to ask on javascript group.

Cezar
Jul 20 '05 #6
"Cezar" <ce*****@imail. net.pl> wrote:
Hello.

How can simple emulating in IE this class ?

.example:hover {
border: 1px solid #696969;
}


http://www.vladdy.net/demos/iepseudoclassesfix.html

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #7
Cezar wrote:
This code not working in IE. That's why I ask for possible solution :-)


I cannot help you without a url. The code snippets you wrote do not
provide the necessary information.
--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #8
"Cezar" <ce*****@imail. net.pl> wrote:
Hello.

How can simple emulating in IE this class ?

.example:hover {
border: 1px solid #696969;
}


People have suggested javascript, and Messinger suggested the
'behaviors' one can use with IE.

If you also need a visited state, however, and I don't know if you do,
then you'd have to stick with an anchor, and essentially use styles to
expand an anchor over the area that you wish to behave as an anchor.
If that's not what you need to do, then jscript or behaviors would
seem the thing.
Jul 20 '05 #9
Thanks for any advices.

I used script from this example
http://www.xs4all.nl/~peterned/examples/cssmenu.html.
Working good.

Regards,
Cezar.

Uzytkownik "Harlan Messinger" <hm************ *******@comcast .net> napisal w
wiadomosci news:ht******** *************** *********@4ax.c om...
"Cezar" <ce*****@imail. net.pl> wrote:
Hello.

How can simple emulating in IE this class ?

.example:hover {
border: 1px solid #696969;
}


http://www.vladdy.net/demos/iepseudoclassesfix.html

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.

Jul 20 '05 #10

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

Similar topics

7
3379
by: LRW | last post by:
Below I'll paste my CSS and the HTML in question. But what's happening is, I'm trying to establish a link behavior for a class that's separate from the normal link class. I've established a: 's with no underline and then an underline for hover...but oddly, only ONE link will actually show the underline on hover. All the rest, even with the...
6
17479
by: Nikolaos Giannopoulos | last post by:
If I have simplified html (I have removed height, weight, alt, etc... attributes to simplify the example) such as: <div id="header"> <a href="blah.html"><img src="img/blah.jpg"></a> </div> and the following CSS rule to apply a background color to text links on hover:
12
5009
by: Sander Tekelenburg | last post by:
Trying to make some images disappear on hover (works), and others appear on hover (works not). In tested browsers, this gives the expected result: IMG.disappear {visibility: visible} IMG.disappear:hover {visibility: hidden} this does not: IMG.appear {visibility: hidden} IMG.appear:hover {visibility: visible}
6
4932
by: Michael Rozdoba | last post by:
I've had some trouble getting IE to behave in respect of applying absolute positioning to a span on an a:hover. I can get it to work, but I don't understand why certain code causes it to fail to display the repositioned block. See an example at http://www.digitalrat.co.uk/test2/index.html Can anyone explain what IE thinks it's doing? ...
2
2594
by: Bart | last post by:
Hi there, Since you've all told me that frames ar evil, I'm planning to disguard frames in favour of CSS "pseudo-frames" for my personal website. While trying to "emulate frames" (that is I want a 2 column layout, with the menu in the left column) I came up with this: http://home-1.tiscali.nl/~knmg0017/css_frames_1.htm
15
2820
by: Robert Mark Bram | last post by:
Hi All! Problem I began with: Netscape/Opera supports hover for different elements, IE only supports hover for <a> and I want to use hover for <td class="menu"> I then found a fix using some Javascript here: http://webpages.charter.net/mmmbeer/code/arbitrary-hover/ It works ok for IE now.
2
4162
by: skipc | last post by:
I posted a recent message regarding navigating a table using arrow keys. I've got the code for the navigation working. My table contains rows of links (anchors). I can get to a specific link using the code for capturing a key. However, once I get to the link, I can focus(), for example... but what I really want is to activate the "hover"...
5
2251
by: Stephan Schaem | last post by:
How does one write an unmanaged function that perform this functionality? In short I want to turn off/on visual style in my app... Thanks, Stephan PS: two people have been looking for some time, and no solution aside putting the manifest in a file, and renaming the file before startup was found... very ugly hack ...
4
2256
by: Sigilaea | last post by:
My previous post got squashed because m post is too long. Sorry for that: I have an AJAX page with a CSS menu at the top. My problem is the hover functionality stops working after someone clicks on one of the details in the main blue section. This only occurs in IE6. IE7 and FF work correctly. The URL to the page is:...
0
7896
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...
0
8186
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. ...
0
8329
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...
0
8197
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6583
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...
1
5704
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...
1
2335
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
1
1436
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1160
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.