ASP.Net style css etc.

How to change width of out of box Visual Studio ASP.Net WebForms application

Took a while to work this out. In the Site.Master there is:

<body>
<form runat="server">
<div class="page">...
</div>

If you go to the class=”page” definition on the Site.css you may see a width. This seems to have no effect. I do not know why.

  1. Instead use split view and see on the bottom the different selections e.g.
  2. then with properties showing select
  3. then use the style property
  4. potion
  5. width e.g. 90 %

This may also be achieved in the source on the div tag:

<div class=”page” style=”width: 90%”>

Solved

Leave a comment