0

A actionlink like:

<%= Ajax.ActionLink("more", "myControl", new { id = item.ID },
     new AjaxOptions { UpdateTargetId = "pop", OnComplete = "showdetail" },
     new { @class = "search" })

Then I set css in css file like:

a.search 
{...}
a:search.hover 
{...}

It doesn't work. If I change css name is css file as:

.search 
{...}

It seems work only in Firefox, not work in IE.

How to resolve this issue?

0

1 Answer 1

1

Your CSS appears to be incorrect; you will want to define it as:

a.search { ... }
a.search:hover { ... }
Sign up to request clarification or add additional context in comments.

5 Comments

No; you have a typo in your original CSS. The hover selector should read a.search:hover not a:search.hover.
Thanks. Keep new { @class = "search" } and change css as a.search { ... } a.search:hover { ... } , then It works for Firefox, But not work for IE. Any idea?
Which version of IE? If it's IE6 you may need to go with an alternate solution. Does a:hover { ... } work for you? Does .search:hover { ... }? google.com/… has more approaches.
Thanks. I use IE7. I tried to remove a.search:hover { ... } in css file and tried it again. Still not work for IE. I use this css to display a image for the action link.
Find out the reason: In order to use image for this link, I change the actionlink call as: <%= Ajax.ActionLink(" ", "myControl",...), Firefox seems recognize the space, but IE removes all of them and display nothing. What's the solution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.