How to develop a resolution independent website in asp.net
please suggest 开发者_C百科how to write htm code as a result my website will be resolution independent and it will show same in any resolution and any pc monitor size. please advise. thanks
use percentage in width instead fix width e.g.
<table width="100%">
<tr>
<td width="40%"> </td>
<td width="60%"> </td>
..........
Firstly I think this should be tagged "HTML" and "CSS" because it is the output format.
Next, define what you understand under "it will show same". You can fix it to a small resolution and have more and more open space with bigger resolution or you could scale by using percentage values or calculated values (when using javascript to determine avaible space on the cancas).
I think you need set all sizes in relative mode, e.g. not 800px but 70%
In ASP.NET, set any containers (Grids, Panels etc) to Width = Auto and HorizontalAlignment = Stretch. Assuming the margin is then set to 0, the container will then fill the entire page.
For any components within this container, either set them to Auto/Stretch if you wish for them to fill the entire screen, or set them to a fixed width and a centered HorizontalAlignment.
精彩评论