July 16th, 2013, 09:04 AM
-
Modernizr In IE8 - Pads Content?
I am using IE 8 on my dev machine and I just started including Modernizr in my MVC 4 project to allow the date picker to have quick month and year change functionality in IE 9 and opera.
When I run the application all my content is pushed to the right as if I am padding my content. When I stop including modernizr the content goes back to the left.
Why would including modernizr cause the content to appear to be padded? I have only tested in IE 8 locally.
Here is how I included modernizr in my _Layout.cshtml:
Code:
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title - TestAPP</title>
<meta name="viewport" content="width=device-width" />
<script src="@Url.Content("~/Scripts/modernizr-2.6.2.js")" type="text/javascript"></script>
@Styles.Render("~/Content/Site.css")
@Styles.Render("~/Content/themes/base/css")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryui")
@Scripts.Render("~/bundles/jqueryval")
@RenderSection("scripts", required: false)
@MiniProfiler.RenderIncludes()
</head>
Modernizr is working correctly for my DatePickerReady.js file, but it pushes my content to the right in my Index view.