Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Sep 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    do not let the alignment go out of way

    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

  • #2
    New Coder
    Join Date
    Aug 2002
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    New Coder
    Join Date
    Sep 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorri i dun get your meaning... why its 400 and 500?? this table width is set for??

  • #4
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    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.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #6
    New Coder
    Join Date
    Sep 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i thought if our computer screen size is different, percentage will be a advantage???

  • #7
    c q
    c q is offline
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mumbai, India
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 !

  • #8
    New Coder
    Join Date
    Sep 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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???

  • #9
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #10
    c q
    c q is offline
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mumbai, India
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #11
    New Coder
    Join Date
    Sep 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks alot.. i will go n try it out


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •