baldielocks
25 Jan 2011, 01:36 PM
Can someone please help me, how can i make my pages fit any screen size?
I tried setting the percentage but doesnt seem to be working. Please any help is much apreciated.
thank you
Wickham
26 Jan 2011, 01:54 AM
The % width method does work. You have to code all widths in %, all elements like div, ul, form, table and also all their side margins and side padding and also any images inside them. Make the total of them all 100%.
Borders can't be sized in % so have to stay in px, so make the total of % widths 97% or 98% to allow for the side borders.
Images need coding like:-
<img style="width: ??%;" src="image.jpg" alt="Image 1" />
without a height and then the height will adjust in proportion.
A totally fluid page will look very squashed up in a small window resolution and very spaced out in a larrge window, so be careful. It works best if there isn't much page content.
An alternative is not to use any % widths but to use min-width and max-width in px for a containing div and then the page will expand and contract within limits. Min and max width doesn't work in IE6 so set a fixed width just for IE6 in a conditional comment.
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.