SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
ASP.NET, VB.NET, Microsoft .NET Framework, Microsoft Visual Studio, Windows Forms, Controls and more Tutorials and Articles for Programmers


Use Width and Height instead of Style in Visual Studio 2010

While adding a picture on design mode in Visual Studio 2010, VS automatically adds a style definition to define the width and height for the image tag. But in Visual Studio 2008, the default behaviour was to add width and height attributes within the img HTML tag. If you like to use style definitions, it is no problem. But if you prefer width and height attributes instead of style, we can configure Visual Studio 2010 options for style application mode.

In Visual Studio 2010 IDE, go to Options in VS2010 menu. In Options screen, drill down HTML Designer and click CSS Styling. On the screen a group of CSS application mode settings are displayed.

Mark "Use width and height attributes for image instead of CSS" option in order to automatically add width and height attributes instead of CSS style definitions.

Visual Studio 2010 HTML Designer CSS Styling options

Visual Studio


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.