Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 HTML Table help ...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

laser
Advanced Member

Australia
3859 Posts

Posted - 16 October 2004 :  09:17:05  Show Profile
OK, here's a coding question for you ;)

I have a 3 column table ; middle column is 468 pixels wide ; the side ones must be the same size and must cater for diff res screeens and resizing screen. Always using as much real estate as possible, but not creating any horizontal scroll bars

Any ideas on how to do this using tables ? (I'm sure it can be done in frames, but I don't want to use frames)

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 16 October 2004 :  09:48:52  Show Profile  Visit D3mon's Homepage
try setting the outer columns to width="50%"


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"

Edited by - D3mon on 16 October 2004 09:49:03
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 16 October 2004 :  17:35:23  Show Profile
Yeah, I tried that but it didn't seem to work. I've got a few more ideas to try out though.
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 16 October 2004 :  17:59:09  Show Profile
Why don't you combine the three columns and insert another table at the fixed width, centered in the column? Okay, nested tables stink, but it never fails :)
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 16 October 2004 :  18:18:17  Show Profile
Would that work if the left & right cells needed to have a different bgcolor ? I know I didn't say this to begin with, but my aim is to have (what looks like) a seamless banner across the whole table. The image in the middle has a blend going across, so the left table cell has the bgcolor to match the left side of the image, and the right table cell has a bgcolor to match the right side of the image.

I've resorted to DreamWeaver, which reckons this will work :


<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td> </td>
    <td width="468"> </td>
    <td> </td>
  </tr>

but it doesn't, and if I make the variable width cells 50% I get a horizontal scroll bar at 800x600
Go to Top of Page

zinpin
Junior Member

Australia
202 Posts

Posted - 16 October 2004 :  18:41:08  Show Profile
maybe this will help laser

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="33%" bgcolor="red"> </td>
<td width="468" bgcolor="white">Main table...</td>
<td width="33%" bgcolor="red"> </td>
</tr>
</table>


Edited by - zinpin on 16 October 2004 18:48:13
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 16 October 2004 :  18:47:03  Show Profile
33% might not be enough if the 468 pixels for the center column aren't 33% or more of the entire screen width, like on monitors set to 1600x1200. I'll have to play around with a test file tomorrow to see what will work.
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 16 October 2004 :  18:52:23  Show Profile
Thanks zinpin, I've done basically the same thing from scratch and it works like a charm. Where I want it to work (a customised MaxWebPortal header) I can't get it the same so it's more the CSS (etc..) in there rather than the underlying HTML

Thanks for the help anyway, always appreciated
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 16 October 2004 :  19:00:40  Show Profile
You know, I just made a simple test file, and it only works when I don't enter a width for the left and right columns. If I set a percentage it ignores the pixel width of the center column, either making it smaller or wider.
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 16 October 2004 :  19:18:31  Show Profile
Thanks guys for the help The key to fixing it was another row further down that was obviously having some influence. As soon as I added a </table><table> after the first row it worked like I expected it to.

The key things were :

- must specify table as 100%
- no widths in the left & right cells
- nbsp in the left & right cells
- hardcode the middle cell width

Now, off to do some other things I promised ....
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07