...

View Full Version : do not let the alignment go out of way



bluez
10-01-2002, 02:23 AM
what should i add in my html page so that when i minimize my page, it wont affect the alignment of the button and text fields??? thanks

AlienSkater23
10-01-2002, 03:27 AM
instead of using percent values for you page you need to use pixels for example:::

<table width="90%" width="90%"> BAD!!!

<table width="400" width="500"> GOOD!!!

have fun? good?

Chris

bluez
10-01-2002, 03:41 AM
sorri i dun get your meaning... why its 400 and 500?? this table width is set for??

Nightfire
10-01-2002, 12:47 PM
Basically, if you use percentages for widths and heights, stuff will move around when you change your browser size. If you use fixed sizes, like what Alienskater was trying to show then nothing should move around on the screen.

<table width="300">
<tr>
<td width="150">Blah</td>
<td width="150">de blah</td>
</tr>
</table>

No matter how much you change your browser, the above table will not allow anything to move around.

ronaldb66
10-01-2002, 02:03 PM
Then again, to call percentages "BAD" and absolute values "GOOD" is a bit short-sighted... If you use tables for page layout, setting the table dimensions fixed will disable your layout to fit the available space. If some of the columns should remain a fixed width and others are allowed to adapt, it may be more appropriate to use percentages for table dimensions and fixed values for those cells that need to keep a fixed width.

bluez
10-02-2002, 06:28 AM
i thought if our computer screen size is different, percentage will be a advantage???

c q
10-02-2002, 10:16 AM
hmmm..I have a nice trick that I picked up frm somewhr...
try this....
<table width=100%>
<tr>
<td width=40%>
some text in cell no.1
</td>
<td width=60%>
some text in cell no.2
</td>
<tr>
<td>
<img src=spacer.gif width=200 height=1>
</td>
<td>
<img src=spacer.gif width=400 height=1>
</td>
</tr>
</table>

so your spacers take care to see that the table has a certain width no matter how much the window is minimised. and by adding a width=40% width=60% in each individual cell, you make the page look well designed in higher resolution screen settiings too !

bluez
10-03-2002, 04:08 AM
sorry if i have a page without any image... only have those text fields and combo box.. what should i do?? currently i have a page where when i minimize the window.. the width likes doesnt have enough space to accommodate the fields.. there some of my fields went to second line.. how i can i make the changes???

dauvm
10-03-2002, 04:33 AM
if have found that c q's method works the best. If your forms are in a table, use percentages to allow it to expand to fit bigger screens and put the spacer.gif in like c q showed.

just to clarify a little but, spacer.gif should be made as a transparent 1x1px gif image. keep it handy because you will find you can use it for a lot of things.
so if your table needs to be 500px wide in order to keep the forms from going on another line, you stick spacer.gif into another row just like in c q's example.
<img src="spacer.gif" height="1px" width="500px">

and voila, your table can expand as much as it likes, but it will not be able to get less than 500px wide when you resize the browser windows.

-Doug

c q
10-03-2002, 12:56 PM
emm...get yourself a readymade spacer !!
http://www.cbit.ac.in/~niharica/src_files/spacer.gif

just say save target as....and save it as spacer.gif
its a teeny invisible image :D

bluez
10-07-2002, 06:52 AM
thanks alot.. i will go n try it out



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum