Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: DD Mega Menu - adjustment of a mega menu width doesn't work at all while another four

  1. #1
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    98
    Thanks
    6
    Thanked 1 Time in 1 Post

    Post DD Mega Menu - adjustment of a mega menu width doesn't work at all while another four

    Hi!

    Adjustment of a mega menu width doesn't work at all while another four on the same page work well. You can find the page at http://www.ehyeh.com/ehyehindex-toFIX.html. The problem mega menu is the first menu 'News'. I changed the value of the width in style attribute
    Code:
    <div id="menu0" class="mega" style="width;520px">
    variously but it did not respond at all. I wonder what is the problem.
    And I have one more problem, i.e. the 11th list of the 'drop down / mega' menu which starts with 'Guinea' doesn't work for escaping the special character '-', the actual item of it is 'Guinea-Bissau'. I replaced the '-' with Non Break Hyphen HTML code but it doesn't work as christian-marriage.net in the second menu, betterlife-insurance.com in the third menu,
    o-jerusalem.com in the fourth menu and the-quasar-3c-273.com in the fifth menu work. These four are escaped from the line break, showing proper format. But in the first menu it only escapes with Non Break Space as shown in the first list, i.e. THETOP.NEWS - 'Save your time'.

    regards,
    Last edited by naremkim; 01-21-2018 at 10:05 PM. Reason: html code

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,782
    Thanks
    46
    Thanked 227 Times in 220 Posts
    Blog Entries
    54

    Default

    Code:
    style="width;520px"
    should be
    Code:
    style="width:520px"

  3. #3
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    98
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default First of all thanks for your reply.

    Quote Originally Posted by molendijk View Post
    Code:
    style="width;520px"
    should be
    Code:
    style="width:520px"
    I expected what you exactly expected as it is a simple mistake. I changed it but surprisingly it doesn't work! I'm wondering why.. And what about the escaping the special character problem ?

    Thanks Arie,

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,782
    Thanks
    46
    Thanked 227 Times in 220 Posts
    Blog Entries
    54

    Default

    Maybe there's something in the script that overrides the style that you give to menu0, so try
    Code:
    style="width:520px!important"
    As for Guinea-Bissau, I don't know what you mean (what I see in the menu is Guinea-Bissau).

  5. #5
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    98
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    Thanks for your reply.

    I tried but it didn't work too. I think the problem is due to the first menu has its submenu. The other four don't have the submenu. So the problem is possibly the script problem. Can you check it for me?
    For Guinea-Bissau issue it appears not escaping special character mode on Chrome which I have used to use. I wonder why it happens on only the first menu but not the other.

    Regards,

  6. #6
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    98
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    It does work. I checked with 'width:520px' but not with variation, i.e. '620px' etc. I was somewhat hurry. My apology.
    I'm willing to give you a gift of $50 on letting me know the code for escaping the special characters including an image (specifically down.png) and where I have to put the code in the script, if you would like to. I think 'encodeURIComponent()' method can be used for it but I'm not sure.

    Thanks,
    Last edited by naremkim; 01-23-2018 at 06:10 AM. Reason: adding some content

  7. #7
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,782
    Thanks
    46
    Thanked 227 Times in 220 Posts
    Blog Entries
    54

    Default

    Maybe I understand now what you mean regarding the difference between Guinea-Bissau on the one hand, christian-marriage.net and betterlife-insurance.com etc. on the other. You are using &#8722; in Guinea-Bissau, and &#8209; in the other cases. Use &#8209; in all cases.
    Does this solve your hyphenation problem?

  8. #8
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    98
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    Thanks, Arie.
    Second common error! It works.
    And I have to correct the somewhat 'Messi' mistake i.e. 'encodeURIComponent()' method.
    I think something like
    Code:
     String.prototype.escapeHTML = function() {
            return this.replace(/&/g, "&amp;")
                       .replace(/</g, "&lt;")
                       .replace(/>/g, "&gt;")
                       .replace(/"/g, "&quot;")
                       .replace(/'/g, "'");
        }
    will work for replacing/escaping the special characters (but not sure for the image) as you must know well.
    I can discuss this matter at the 'Paid Help' section if you would like to.

    Thanks again.
    Last edited by naremkim; 01-23-2018 at 02:37 PM. Reason: adding missing thing

  9. #9
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,782
    Thanks
    46
    Thanked 227 Times in 220 Posts
    Blog Entries
    54

    Default

    Hello Naremkin,
    You could put it at the Paid Help section, but I don't do paid jobs. Maybe someone else is willing.
    This being said, I still don't understand what you say about the difference between Guinea-Bissau and christian-marriage.net, for example. The format is exactly the same
    in both cases we have &#8209;
    Guinea&#8209;Bissau vs Christian&#8209;marriage.net.

    Another thing I don't understand is why you need a javascript encodeURIComponent() function. This function is used in javascript strings (info at https://www.w3schools.com/jsref/jsre...IComponent.asp), but the text on your site is normal HTML plus HTML-entities, so why would you need it?

    Or do you just want to get rid of the HTML-entities and write normal HTML, where the hyphens must prevent a line break though? Then use '-' and put this on your page:
    Code:
    <script>
    function replace_hyphen() {
    for (i = 0; i < document.body.innerHTML.length; i++) {
    document.body.innerHTML = document.body.innerHTML.replace("-", "&#8209;");
    }
    }
    window.onload=replace_hyphen
    </script>

  10. #10
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    98
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    Hi! Molendijk,

    Thanks for your kind reply.
    I wrote "Second common error! It works." due to I forgot to change '' to '' after some trials so I meant it was common error and it was fixed after I changed it. [I don't know how to show the hyphens to the entity code.]
    Well, however, I have struggled with the script though it was not essential for my problem. The essential problem is the line breaking with '-' '&' 'space' and, I thought, the image 'down.png' (but it is not, but the actual problem was the 'submenu link').
    I tried with the code, You can view the result at http://gigabitsisp.com/ehyeh/ehyehin...ialScript.html.
    And I tried to resole the line breaking problem but I have not find the solution yet. The followings are the trials.
    Without submenu : http://http://gigabitsisp.com/ehyeh/...x-toFIX-1.html
    With submenu with the triangle: http://gigabitsisp.com/ehyeh/ehyehindex-toFIX.html
    With submenu without the triangle: http://gigabitsisp.com/ehyeh/ehyehindex-toFIX-0.html

    I wonder how can I resolve the line breaking problem with the submenu link.

    Thanks again,
    Last edited by naremkim; 01-24-2018 at 08:40 PM. Reason: Fixing character entity

Similar Threads

  1. DD Mega Menu does not work in IE
    By KIMKO in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 06-16-2014, 08:55 AM
  2. How to make DD Mega Menu (.solidblockmenu) 100% width?
    By TGGMike in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 12-25-2013, 12:01 AM
  3. Replies: 0
    Last Post: 03-02-2013, 11:55 AM
  4. Mega Menu 960px width ?
    By mulaus in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 04-06-2012, 02:52 PM

Bookmarks

Posting Permissions

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