Link to home
Start Free TrialLog in
Avatar of Rus
Rus

asked on

Border problem

Hi,

The code below should create two columns: the first one 110 pixels width, the second one 490 pixels. This way the text would be on the left hand side of the background border. But the first cell is only about 10 pixels width.

I have  put &bsp; in the first cell, and don't want to place an image or something else here. How can I make this cell 110 pixels width?

You can also view the page online:

http://www.intelcities.com/Oakwood_Drive/jeffrus/test.html


Thanks

------------

<html>
<head><title>Test</title>
</head>
<body background="border.gif">
<table width=600 cellpadding="0" cellspacing="0" border=0>
<tr><td rowspan=2 width=110 valign=top>&nbsp;</td>

<td width="490" valign=top>
<table width="490" cellpadding="3" cellspacing="0" border="1">
<tr><td bgcolor="#FFFFCC" width="490">

<font size="2"><b>
<a href="link">Link</a> | <a href="link">Link 2</a> | <a href="link">Link 3</a> | <a href="link">Link 4</a></font></td>
</tr></table>
</td></tr>
<tr><td valign=top>
&nbsp;<br>

Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,<p>
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,


</td></tr>
</table>
</body>
</html>
Avatar of chewymon
chewymon

Try this.  I removed one of the nested tables.  It shows a little differently in IE5 and Netscape4.7, but everything is in the right place.  You might have to accept a compromise due to the difference in the way the browsers render tables.

<HTML>
<HEAD>
<TITLE>Test</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>

<BODY bgcolor="#FFFFFF" background="border.gif">
<TABLE width=600 cellpadding="0" cellspacing="0" border="0">
  <TR>
    <TD rowspan=2 width="150" valign=top>
      <p><IMG src="1x1.gif" width="1" height="1">
    </TD>
    <TD bgcolor="#FFFFCC" width="490" valign=top> <FONT size="2"><B> <A href="link">Link</A>
      | <A href="link">Link 2</A> | <A href="link">Link 3</A> | <A href="link">Link
      4</A></B></FONT></TD>
  </TR>
  <TR>
    <TD valign=top> &nbsp;<BR>
      Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
      bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
      bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
      bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
      bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
      <P> bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
        bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
        bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
        bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
    </TD>
  </TR>
</TABLE>
</BODY>
</HTML>
I have an answer... the way I do it is include a picture that I have created in photoshop, If you don't know how I can send you one.  The picture is only one pixel high and one pixel wide.  Then when you say how wide the picture should be in the html you say a width=110  the picture is a 1x1 gif with a transparent dot.

ASKER CERTIFIED SOLUTION
Avatar of gramdee
gramdee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rus

ASKER

Thanks gramdee :)

Thank you too nathans.. you were the first to suggest the transparent imagel solution. However, on some sites I notice that images don't show up the first time one loads the page. The second time they do. I am not sure what the reason is for this (perhaps time-out). That is why I am hesitant to use the transparent image option.

chewymon, sorry don't like this solution because there is no border around the table (which I think looks better).

Jeff
Avatar of Rus

ASKER

Thanks gramdee :)

Thank you too nathans.. you were the first to suggest the transparent imagel solution. However, on some sites I notice that images don't show up the first time one loads the page. The second time they do. I am not sure what the reason is for this (perhaps time-out). That is why I am hesitant to use the transparent image option.

chewymon, sorry don't like this solution because there is no border around the table (which I think looks better).

Jeff