473,703 Members | 2,898 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 3727
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
3399
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 same HTML, won't pop up an underline. I just don't get it! If I could get any advice I'd really...
6
17487
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
5014
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
4941
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? The page is ugly as I've ripped most of the content & styling out to
2
2600
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
2825
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
4169
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" styles. I can fake the hover effect using javascript, but how do I do this and still allow the...
5
2260
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
2260
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: http://www.coralap.com/dies281css.aspx Steps to reproduce: 1. Mouse over the top menu and verify the hover works. 2....
0
8750
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
8662
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
9111
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
9004
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
8961
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5922
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4679
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3114
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
3
2058
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.