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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer CSS (maybe Javascript) issue on IE

    Hello everyone,

    I'm new on this forum and have a little issue.
    If I have to do a first step like presenting myself just tell me, I'll go check the forum after posting this to check up how I can help because I want it to be a two-ways experience.

    My issue is quite "usual". This Internet Explorer (that I'm starting to hate more than ever) just drives me crazy.

    I have a menu with a submenu, I had to change a few CSS to make it fit to the new design, and then the submenu of some topics are not showing on the way they should do !

    What I've found is that the submenu right margin is calculated through this Javascript code :

    Code:
    			if (($(this).position().left > halfWay)&& (spanWidth<$(this).parent().width())) {
    				var paddings =  parseFloat($(this).css('padding-right'))+parseFloat($(this).css('padding-left'));
    				$('#subnav').css('right', ($(this).parent().width() - $(this).position().left-$(this).width() - paddings ) +'px' );
    			} else {
    				$('#subnav').css('right', null);
    			}

    Well on Chrome, Firefox, Safari and all others browsers, it works like a charm. On Internet Explorer I have the issue that it don't fit and some part of my submenu are missing, only on the three menu items on the right of it.

    Do you know if there is any fix for that kind of code to make it work on the proper way in IE ?


    If I can bring you more info juste let me know I'll do it as quick as I can.

    And once again, if I'm doing something wrong in my post, just tell me gently I'll fix it right now !

    Thanks a lot,
    Regards,
    Guigro

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    3,763
    Thanks
    23
    Thanked 548 Times in 547 Posts
    Hi guigro, welcome to the forums.
    Can't help because your code is not complete. Have no idea what "this" is. Somewhere it needs to be defined.
    You also have "halfWay". Needs to be defined.
    Also think we need to see your html for the menu.
    And in what ver of IE are you seeing this.

    A link to you site would help a lot.
    Evolution - The non-random survival of random variants.


  •  

    Posting Permissions

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