Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





Pages (2): [1] 2 »   Last Thread  Next Thread
Author
Thread Post New Thread   

Hover emulating in IE
 

Cezar




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 04:15 AM  
Hello.

How can simple emulating in IE this class ?

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

Greets,
Cezar.




Post Follow-Up to this message ]
Re: Hover emulating in IE
 

Brian




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 04:15 AM  
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/


Post Follow-Up to this message ]
Re: Hover emulating in IE
 

Neal




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 04:15 AM  
On Tue, 15 Jun 2004 02:28:43 +0200, Cezar <cezaryk@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.


Post Follow-Up to this message ]
Re: Hover emulating in IE
 

Jukka K. Korpela




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 09:15 AM  
Neal <neal413@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.borderColor = color; }
</script>
...
<p class="example"
onmouseover="setborder(this,'#696969')"
onmouseout ="setborder(this,'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.borderColor = 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/


Post Follow-Up to this message ]
Re: Hover emulating in IE
 

Cezar




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 12:14 PM  
> Sorry, I cannot quite grasp what you're asking. Can you try rephrasing
> it in clearer words?
> 
>
> 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:hover{
border: 1px solid #696969;
}

Greets,
Cezar.




Post Follow-Up to this message ]
Re: Hover emulating in IE
 

Cezar




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 12:14 PM  
> 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




Post Follow-Up to this message ]
Re: Hover emulating in IE
 

Harlan Messinger




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 05:15 PM  
"Cezar" <cezaryk@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.


Post Follow-Up to this message ]
Re: Hover emulating in IE
 

Brian




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 05:15 PM  
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/


Post Follow-Up to this message ]
Re: Hover emulating in IE
 

Mark Johnson




quote this post edit post

IP Loged report this post

Old Post  06-16-04 - 12:16 AM  
"Cezar" <cezaryk@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.




Post Follow-Up to this message ]
Re: Hover emulating in IE
 

Cezar




quote this post edit post

IP Loged report this post

Old Post  06-16-04 - 12:14 PM  
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" <hmessinger.removethis@comcast.net> napisal w
wiadomosci news:htltc05k1t6gubih8ph9mk6jb669bngnhf@4ax.com...
> "Cezar" <cezaryk@imail.net.pl> wrote:
> 
>
> 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.




Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 03:51 AM. Post New Thread   
Pages (2): [1] 2 »   Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top