JQuery model dialog position not fixed

Total Post:89

Points:629

 3398  View(s)
Ratings:
Rate this:

Hi Everyone!

I'm working on MVC 4 project. In this project I have used model dialog that provide by MVC 4. This model dialog scroll with screen. I want to fixed model dialog in screen center.

I have used below line of css and jQuery.

 <link href="@Url.Content("~/Content/themes/base/minified/jquery-ui.min.css")" rel="stylesheet" type="text/css" />
 <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
 <script src="@Url.Content("~/Scripts/jquery-ui-1.8.20.min.js")" type="text/javascript"></script>

Please help me!

Thanks in advance!

  1. Re: JQuery model dialog position not fixed

    Hi Takeshi!

    If I'm right, then you are using MVC JQuery and CSS for creating this model popup.
    Hence, for fixing position of model popup, open "jquery-ui.min.css" file from Content\themes\base\minified folder and change ".ui-dialog" class position

    absolute to fixed as following.

    .ui-dialog
    {
    position: fixed;
    }

    I hope it resolve your problem.

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.