Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 10, 2012 04:41 PM by rbav73
Jul 10, 2012 12:33 PM|LINK
I recently converted an application from Visual Studio 2008 to Visual Studio 2010 and now the CSS is acting weird. We're on .NET framework 4.0, is there some sort of setting that I missed. We're using master pages and I've gone through and the stylesheet
looks fine, for whatever reason the spacing is collapsed and some of the fonts are coming up as serif when they are supposed to be Arial.
Has anyone else had this problem?
Jul 10, 2012 02:44 PM|LINK
migration never replaces any line of in-line code or code behind seems like a wired issue here
anyways if you have back just copy the inline code and try testing it
Jul 10, 2012 04:38 PM|LINK
This could be because ASP.NET 4 changed the default rendering of some controls, so your CSS is probably OK, it's just that the HTML they target isn't, because ASP.NET is rendering it different. You have two options:
Examing the HTML output and change the CSS to match. You'd need to check the master page and all pages to make sure it's working OK.
Change the default rendering mode. Open web.config and find the <pages> element. If there isn't one, add one, and add the compatibility setting.
<pages controlRenderingCompatibilityVersion="3.5" />
This will change the default rendering back to the old way and your CSS should be OK.
Jul 10, 2012 04:41 PM|LINK
Thank you for your replies. As it turns out, it was rendering fine but I just upgraded to Windows 7 so it was displaying differently until I clicked the Compatibility View in IE. Random find but it worked.