Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi guys
i have a general question,i have back end developer of an asp.net web site,i'm familiar with html and css but i'm not an expert.
my site works fine on my laptop but when i browsed it with smaller screen laptops or with mobile devices,i see that for example some components(inputs,images,...) do not fit the screen or their are on top of each other!
it seems that this html page only looks fine on 16inch screens
how can i optimize html for different screens that they all look the same,and in next step how can i optimize for mobile devices
tanx
Posted
Comments
bbirajdar 12-Dec-12 9:37am    
There are thousands of ways to get the markup screwed and I cannot guess which might be your favourite unless you show us the HTML you have written...

You dont need to optimize, but write a compatible markup for all browsers and screen sizes

Hi Arash Khangaldi,

This is totally dependent upon your design structure.

Let me share my knowledge with you.

1. If you are designing a page using the height and width of any
or with the values in "pixel" then while the window is adjusted the page and the controls that you have set for your page will try to adjust with the given portion but you have given a fixed length for the page controls. so that will then be distorted.

2. If you are designing the page with the values defined in "%" then your page controls and the value of the width and height of your controls will be adjusted in "%".
This will not distort your page.

This takes the whole page as 100% and divide the length among themselves.

For better understanding view this link.
{ Difference between em, % and px; }
percentage vs pixels?

Thanks
 
Share this answer
 
Comments
Arash Khangaldi 12-Dec-12 10:12am    
thank you,it helped :)
[no name] 12-Dec-12 10:19am    
Awesome man.. :) +5
you can use the percent for width of you page. Because when you want to use fixed pixel then the resolution mismatch with your given pixel.

one thing, when you use percent for width or height then you must use all the tools with percent. I mean, dont use like some tools with pixel and some tools with percent.

thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900