开发者

How to develop a resolution independent website in asp.net

开发者 https://www.devze.com 2023-02-14 07:48 出处:网络
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. thanksuse percent

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消