Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Cursor property in IE

    Is "cursorointer;" not working in IE? Can somebody give me a substitute for that, because it's working in all browsers except from IE.

    Thank you very much!

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,607
    Thanks
    6
    Thanked 997 Times in 970 Posts
    It is working in IE. But you need to give us more context to see what your problem is. We can’t read your mind, you know?

  • #3
    New Coder
    Join Date
    Jul 2012
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I am sorry for not giving you more details.

    I have a jquery content slider and that has two arrows ( left and right) in order to navigate. This is the html:

    <img src="images/control_right.jpg" id="rightControl">
    <img src="images/control_left.jpg" id="leftControl">

    and this is the CSS:

    .control {
    width:39px;
    height:263px;
    text-indent:-10000px;
    position:absolute;
    cursor: pointer;
    }
    #leftControl {
    top:0;
    left:0;
    float:left;

    }
    #rightControl {
    top:0;
    right:0;
    float: right;
    }

    The .control class has to do with my script code. The problem is that when I hover in IE over the arrow images, nothing happens. In all the other browsers works perfecty. So I assumed it has something to do with the cursor: pointer; property.

  • #4
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    I don't see a control class. If you're dynamically adding it, maybe something is wrong with your script.

    Why don't you just put...

    Code:
    #leftControl, #rightControl {
        cursor:pointer;
    }

  • Users who have thanked ttkim for this post:

    andi192 (03-11-2013)

  • #5
    New Coder
    Join Date
    Mar 2013
    Posts
    63
    Thanks
    2
    Thanked 2 Times in 2 Posts
    I find the best way is to enable html5 for IE, then any code that works with Firefox, Chrome, will look the same on IE/Opera, safari, etc...

    The best way to do this to use the HTML5 shiv

    First download the html5 shiv
    HTML5 IE Shiv

    Place it on your server if you are using a hosting server(via ftp)

    Insert minified distribution shiv in <head> element (after or before your CSS):

    Code:
    <!--[if lt IE 9]>
    <script src="dist/html5shiv.js"></script>
    <![endif]-->
    If you don't have a hosting server you can also use

    Code:
    <!--[if lt IE 9]>
                <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
            <![endif]-->
    The script src should be linked to where ever on your server the shiv is hosted or if it is hosted by google code.

    This way any code that is written for html5 for firefox/chrome such as the cursor code will also display the same way in ie 9 and below, thus creating cross browser compatibility.



    Hope this helps you and whom ever may be reading as this helped me very much.

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,607
    Thanks
    6
    Thanked 997 Times in 970 Posts
    chakanevil, I fail to see how this has anything to do with the prevailing problem. I’d appreciate if you wouldn’t hijack threads with completely irrelevant posts.

  • #7
    New Coder
    Join Date
    Mar 2013
    Posts
    63
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by VIPStephan View Post
    chakanevil, I fail to see how this has anything to do with the prevailing problem. I’d appreciate if you wouldn’t hijack threads with completely irrelevant posts.
    The fact is that the reason IE may not be showing the content is because IE does not enable HTML5 by default, and this allows html5 to be shown, this is not irreverent, nor do I appreciate the statement about hijacking the thread

    HTML5Shiv is a JavaScript workaround, discovered by Sjoerd Visscher, to enable styling of HTML5 elements in versions of Internet Explorer prior to version 9, which do not allow unknown elements to be styled without JavaScript.

    Prior to version 9 of Internet Explorer there was little to no support for HTML5 elements and other HTML5 features.

    The problem could very well be that his code is HTML5 based, and like i said this works very well with IE.

  • #8
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,607
    Thanks
    6
    Thanked 997 Times in 970 Posts
    Quote Originally Posted by chakanevil View Post
    The problem could very well be that his code is HTML5 based, and like i said this works very well with IE.
    This is pure speculation because all the code the OP showed was two images (which have been present since the invention of HTML (i. e. version 1)) and some CSS, and assuming that the cursor couldn’t work because HTML 5 is being used is very far fetched. The OP said nothing about HTML 5 and the first thing you write is “I find the best way is to enable html5 for IE […]” when the issue is in fact a pure CSS issue, and your “solution” (including a JavaScript file to “fix” unrelated shortcomings with HTML in IE) is completely off topic as user ttkim before you has already given a pretty close one-liner solution.

    As said, this has nothing to do with HTML 5 support in IE. And even if the OP was using HTML 5, this problem can easily be solved with a simple one-line CSS rule if applied to the right element(s).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •