Navigation Modal - 'Text Close?

Hi guys, these help mods are so awesome!!

A quick question… Is there any Way i could accomplish the following??

When I click on the Navigation modal menu option, i have a little X to close… but i would like to add text infront of the X … Like in the screenshot i took from an website…
Is that possible? if so how :slight_smile:

Thanks allot guys!!

Hi There,

Thanks for writing in!

There is no such setting in the teme to add text to the close button.
I can point you to custom JS and CSS code to help you to add the text. As this is something custom code, please use this as your own responsibility

Js code would go to Theme Option -> JS

jQuery( document ).ready(function() {
    jQuery( ".x-modal-close" ).append( "<span class="close-text">Your Text Here</span>" );
});

This code will append the text near to the close button. You can change the Your Text here with your original text in the code.
You need CSS to make it looks good.
CSS will go to Theme Option -> CSS

.x-modal-close {
display: inline-block !important;
width: auto !important;
}
.x-modal-close span {
display: inline-block;
}
.x-modal-close span.close-text {
font-size: 14px !important; /* you can adjust this size.*/
}

Hope this helps!

Hi! Fast reply!

I’ve put the codes in, but nothing happened, i refreshed the pages, no changes , like it had no effect.

Maybe an error somewhere?

Please try using this method instead (remove the previous one suggested). Then, add this code in the Element CSS

$el .x-modal-close span:before {
  content: "close";
  right: 100px !important;
  margin-right: 10px;
  font-size: 16px;
}

$el .x-modal-close-right {
  right: 80px !important
}

Since this is not an option offered in the theme, regretfully, we could not continue on providing you with custom solution. Please use our custom code guides as a starting point.

If those still does not work on your end, you’ll need to consult with a third party developer as this will be getting into custom development which is outside the scope of our support. Please see our Terms

Thank you for understanding.

Hi @christian_y IT WORKED! my man! :slight_smile: :slight_smile:
greaat whoho

Thanks

Glad it help, @creativeG. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.