How do I lock webpage table column size

Discussion in 'HTML & Website Design' started by dalani, May 9, 2006.

  1. #1
    Is there a way to lock a table column size so it looks fine in all browsers????
    I have a simple webpage design that uses columns. Unfortunatly, the columns size varies wildly and look awful in Firefox! I have tried many times to fix this such that three columns on my page have the same width. At best the webpage looks fine in OpenOffice or Frontpage but looks like sh*t in Firefox preview.
    any help would be appreciated.
     
    dalani, May 9, 2006 IP
  2. ahkip

    ahkip Prominent Member

    Messages:
    9,205
    Likes Received:
    647
    Best Answers:
    0
    Trophy Points:
    310
    #2
    ahkip, May 9, 2006 IP
  3. johneva

    johneva Well-Known Member

    Messages:
    1,480
    Likes Received:
    46
    Best Answers:
    1
    Trophy Points:
    170
    #3
    Use Divs but preferably dont use absolute positioning.

    Max Designs

    Take a look in the float tutorials for some layouts and there are loads of other good tutorials for CSS designs.

    Glish Layouts

    And the A List Apart Link given by samspunk is an exellent resouce too.
     
    johneva, May 9, 2006 IP
  4. jfilley

    jfilley Peon

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Set your table width to the size you want then use transparent spacer.gif's in the table cells to fix the width so it doesn't go below that. You can then also set your table to 100 percent and have a fourth column with width="99%"and it will take up all but what you have allocated with the spacer.gif's. That way as a user changes width's only the outer column will grow or shringk and other three will stay constant.

    that is the old school before css way of doing things. Still useful to acheive certain effects.
     
    jfilley, May 9, 2006 IP
  5. ahkip

    ahkip Prominent Member

    Messages:
    9,205
    Likes Received:
    647
    Best Answers:
    0
    Trophy Points:
    310
    #5
    but spacer.gif make page load much slower
     
    ahkip, May 9, 2006 IP
  6. ramakrishna p

    ramakrishna p Notable Member

    Messages:
    1,798
    Likes Received:
    361
    Best Answers:
    0
    Trophy Points:
    240
    #6
    <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td width="25"></td>
    <td width="60"></td>
    <td width="90"></td>
    <td width="35"></td>

    </tr>
    </table>

    As shown above you can fix the width of td. When you are giving width size to td don't forget to remove &nbsp that exist between opening and closing tags of td. Give a try. There is no need of Spacer.
     
    ramakrishna p, May 9, 2006 IP
  7. digiseek

    digiseek Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Better use fixed width means width="100px". That way the width will be constant in all the browsers.
     
    digiseek, May 9, 2006 IP
  8. jfilley

    jfilley Peon

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    fix width of td's don't work on all browsers that's why you use spacers. Netscape is really weird with that. BTW how long does it take to load a 1px X 1px image? Thats pretty much standard for non CSS layout.
     
    jfilley, May 9, 2006 IP
  9. dalani

    dalani Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    thanks for the tips; Openoffice does not support css; so ill look at those tutorials later (i know that css is the correct solution) but in the meantime I'll try the spacer gif thing-seems like the ticket!
     
    dalani, May 9, 2006 IP
  10. dalani

    dalani Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    thanks for the tips; Openoffice does not support css; so ill look at those tutorials later (i know that css is the correct solution) but in the meantime I'll try the spacer gif thing-seems like the ticket!
     
    dalani, May 9, 2006 IP
  11. ramakrishna p

    ramakrishna p Notable Member

    Messages:
    1,798
    Likes Received:
    361
    Best Answers:
    0
    Trophy Points:
    240
    #11
    I agree. Spacers are useful solutions to fix width and length and won't increase file size and not an obstructions for page loading.
     
    ramakrishna p, May 9, 2006 IP