PDA

View Full Version : A few general questions



brw2009
13 Jun 2009, 05:37 PM
Hey all,

I am fairly new to Web Programming, and if anyone could please take the time to answer any of these questions it would be greatly appreciated :)

1. I am designing a web page at the moment, and would like to know, I have a div element at the top of the page with two tables in it with the title of the page and a login/password form...but I would like to know how to make it so when the page is minimised, it changes accordingly, as mine doesnt seen to?

2. Also, on the same div element, how do i make it so it doesnt actually spread across the whole screen? An example of this is this website, how have they made it so that on the home page at the top of the page is a little panel with the title on it, but it looks really smart with a certain width to it?

Thank you in advance :)

Wickham
14 Jun 2009, 04:09 AM
You mean fluid design so that everything expands or shrinks at different window resolutions?

Use % for widths of all elements like divs, tables, images, etc. including % widths for side margins and padding so that they total 100%.

Unfortunately borders cannot use % widths so if you have side borders in px you will need to allow space for them by totalling the % widths to 97% or 98%.

It can be tricky to get it working as images will resize heights automatically in proportion to the % width if you don't state a height for them, which is a good thing, but it may disrupt the layout for items below.