Samuel D.
Samuel D.

Reputation: 3

jQuery ui dialog not using site.css in ASP.NET MVC 3 app

I am using jQuery ui dialogs in my MVC 3 app and for some reason, the style elements that are defined in my site.css file are applied everywhere except in the jquery dialogs.

I tried finding what's wrong using the Chrome Developper Tools, but I just can't figure it out. Any ideas?

Thanks!

UPDATE:

Here is how I referenced css files in _Layout.cshtml:

    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/dataTables/dt_page.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/dataTables/dt_table.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/dataTables/dt_table_jui.css")" rel="stylesheet" type="text/css" />

Upvotes: 0

Views: 1080

Answers (1)

Tommy Dugger
Tommy Dugger

Reputation: 68

jquery-ui uses it's own style sheets contained in the content/themes folder of your project. To make changes to the jquery-ui widgets, you need to make changes to these style sheets and not your site.css file. You can also download pre-made styles for the query-ui widgets by going to www.jqueryui.com

Specifically, there should be a jquery.ui.dialog.css file under the base folder in the themes directory.

Edit: http://jqueryui.com/themeroller/

You can also make themes at the jqueryui website as well as download pre-made ones.

Hope this helps.

Upvotes: 1

Related Questions