I was wondering if there is some article that I can read that would help me design my page to fit all screens. I have bult a site for my screen and looks great on mine. However, when I look at the site on someone elses screen aka a smaller screen or smaller
resolution is messes the whole structure of the page. I think that its just the way that I have coded my masterpage, but I dont know enough about it to figure out why it just wont size down or expand to fit anyscreen size.
No it didnt, I got to playing around with my screen sizes to try it out and actually I didnt even have to switch screen sizes all I had to do was simply minimize it and the whole thing jumbled again (using percents)
No it didnt, I got to playing around with my screen sizes to try it out and actually I didnt even have to switch screen sizes all I had to do was simply minimize it and the whole thing jumbled again (using percents)
depends on your layout you can refer my site when you minimize the case is different
I see you build everything into tables, should I switch my code to do so? Right now I am only using <div class=""> between swithcing to tables and percents should my site function more properly when moving to different screen sizes and when minimized?
cartaysmm
Member
318 Points
643 Posts
Page size
Feb 20, 2009 01:04 AM|LINK
I was wondering if there is some article that I can read that would help me design my page to fit all screens. I have bult a site for my screen and looks great on mine. However, when I look at the site on someone elses screen aka a smaller screen or smaller resolution is messes the whole structure of the page. I think that its just the way that I have coded my masterpage, but I dont know enough about it to figure out why it just wont size down or expand to fit anyscreen size.
magendran
Participant
1050 Points
177 Posts
Re: Page size
Feb 20, 2009 04:34 AM|LINK
Hi
Try this
<
body onload="alertSize()"> window.onresize=function(){
alertSize()
}
function alertSize() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IEmyWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatiblemyWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
window.alert( 'Width = ' + myWidth );window.alert(
'Height = ' + myHeight );}
</script>maha...
cartaysmm
Member
318 Points
643 Posts
Re: Page size
Feb 20, 2009 06:33 AM|LINK
I am sorry I dont understand where to place this code, I placed in in:
<body>
<script type="text/javascript">
</script>
</body>
Is this correct?
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: Page size
Feb 20, 2009 06:45 AM|LINK
instead of giving width in pixels give the width of controls in percentages
Then the Page will adjust the size based on width of window rendered accordingly
Contact me
cartaysmm
Member
318 Points
643 Posts
Re: Page size
Feb 20, 2009 03:13 PM|LINK
I wont be able to check it prolly until tomorrow but I think that did it.. You sir are a genius
cartaysmm
Member
318 Points
643 Posts
Re: Page size
Feb 20, 2009 03:51 PM|LINK
No it didnt, I got to playing around with my screen sizes to try it out and actually I didnt even have to switch screen sizes all I had to do was simply minimize it and the whole thing jumbled again (using percents)
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: Page size
Feb 20, 2009 03:53 PM|LINK
depends on your layout you can refer my site when you minimize the case is different
www.aspsnippets.com
Contact me
cartaysmm
Member
318 Points
643 Posts
Re: Page size
Feb 20, 2009 03:56 PM|LINK
I love it thats what i need. Do you still express everything in percents?
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: Page size
Feb 20, 2009 04:04 PM|LINK
if you do a view source you will see I have specified all values in percentages like this
<table width = "100%" cellpadding = "0" cellspacing = "0" border = "0" style ="height:100%; ">
Contact me
cartaysmm
Member
318 Points
643 Posts
Re: Page size
Feb 20, 2009 04:38 PM|LINK
I see you build everything into tables, should I switch my code to do so? Right now I am only using <div class=""> between swithcing to tables and percents should my site function more properly when moving to different screen sizes and when minimized?