Jump to content

Why modal forms opened with JS show method shows ugly modal ?


Recommended Posts

I have pages with custom  html/css/jquery design and where modal forms are opened in somewhat uncommon way for me :
not with JS code, but as links :

                        <a href="#modal-signin" class="header__signIn" data-modal><span>BUTTON TO OPEN LOGIN MODAL</span></a>

and login form :

    <div id="modal-signin" class="modal modal-signin">
        <div class="modal-title">
        <div class="form-signin">
            <form action="">

I try to remake it and to open it JS code, as I need to read some data from db with ajax when I open modal form.
I try to make the same with JS code using .show method :

<a  onclick="modalSigninOpen(); return false;" class="header__search">
    <svg width="15" height="15">
        <use xlink:href="/img/sprite.svg#search"></use>

    function modalSigninOpen() {

modal form is opened, but looks ugly and not centered.
Please open site at http://photographers.my-demo-apps.tk/
and try to click on Enter/Search buttons at right top : https://prnt.sc/26kr0wp

Which methods have I to use and how that can be fixed ?


Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.