Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

some help please 4

Status
Not open for further replies.

coldfused

Technical User
Jan 27, 2001
2,442
US
why would this bottom <td

be collapsing all the way to the left over my first one..

<TABLE WIDTH=&quot;100%&quot; BORDER=&quot;0&quot; CELLPADDING=&quot;0&quot; CELLSPACING=&quot;0&quot;>
<TR>
<td width=&quot;760&quot; height=&quot;125&quot; background=&quot;images/oms_html_09.gif&quot;></td>
<td width=&quot;100%&quot; align=&quot;left&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; background=&quot;images/spacer4.gif&quot;></td>
</TR>
</TABLE>

I want the first table to be 760 pixels wide. The second is a spacer that should fill 100& of the rest of the browser..So why is the second collapsing over the first..If I leave the first as just an image like this:

TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD><IMG SRC=&quot;images/oms_html_09.gif&quot; WIDTH=760 HEIGHT=125 ALT=&quot;&quot;></TD>
<td width=&quot;100%&quot; align=&quot;left&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; background=&quot;images/spacer4.gif&quot;></td>
</TR>
</TABLE>

It fine..The reason I need the first code is to make the image in second a background so I can add text over the top..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
Hi virt2002,

Try this:
Don't set the width (width=&quot;100%&quot;) at all in the second <td>
Just leave it blank.

<TABLE WIDTH=&quot;100%&quot; BORDER=&quot;0&quot; CELLPADDING=&quot;0&quot; CELLSPACING=&quot;0&quot;>
<TR>
<td width=&quot;760&quot; height=&quot;125&quot; background=&quot;images/oms_html_09.gif&quot;></td>
<td NO width here align=&quot;left&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; background=&quot;images/spacer4.gif&quot;></td>
</TR>
</TABLE>

Hope this helps,
Erik



<-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
nah that did'nt work..Funny thing is is the table i have above it with my navigation in it, it works fine..:

<TABLE WIDTH=&quot;100%&quot; BORDER=&quot;0&quot; CELLSPACING=&quot;0&quot; CELLPADDING=&quot;0&quot;>
<tr>
<td><a href=&quot;index.html&quot; target=&quot;_top&quot; onClick=&quot;MM_nbGroup('down','group1','home','',1)&quot; onMouseOver=&quot;MM_nbGroup('over','home','images/oms_html_03over.gif','',1)&quot; onMouseOut=&quot;MM_nbGroup('out')&quot;><img src=&quot;images/oms_html_03.gif&quot; alt=&quot;&quot; name=&quot;home&quot; width=&quot;100&quot; height=&quot;35&quot; border=&quot;0&quot; onload=&quot;&quot;></a></td>
<td><a href=&quot;aboutus.html&quot; target=&quot;_top&quot; onClick=&quot;MM_nbGroup('down','group1','aboutus','',1)&quot; onMouseOver=&quot;MM_nbGroup('over','aboutus','images/oms_html_04over.gif','',1)&quot; onMouseOut=&quot;MM_nbGroup('out')&quot;><img src=&quot;images/oms_html_04.gif&quot; alt=&quot;&quot; name=&quot;aboutus&quot; width=&quot;100&quot; height=&quot;35&quot; border=&quot;0&quot; onload=&quot;&quot;></a></td>
<td><a href=&quot;services.html&quot; target=&quot;_top&quot; onClick=&quot;MM_nbGroup('down','group1','services','',1)&quot; onMouseOver=&quot;MM_nbGroup('over','services','images/oms_html_05over.gif','',1)&quot; onMouseOut=&quot;MM_nbGroup('out')&quot;><img src=&quot;images/oms_html_05.gif&quot; alt=&quot;&quot; name=&quot;services&quot; width=&quot;100&quot; height=&quot;35&quot; border=&quot;0&quot; onload=&quot;&quot;></a></td>
<td><a href=&quot;webdesign.html&quot; target=&quot;_top&quot; onClick=&quot;MM_nbGroup('down','group1','portfolio','',1)&quot; onMouseOver=&quot;MM_nbGroup('over','portfolio','images/oms_html_06over.gif','',1)&quot; onMouseOut=&quot;MM_nbGroup('out')&quot;><img src=&quot;images/oms_html_06.gif&quot; alt=&quot;&quot; name=&quot;portfolio&quot; width=&quot;100&quot; height=&quot;35&quot; border=&quot;0&quot; onload=&quot;&quot;></a></td>
<td><a href=&quot;contact.html&quot; target=&quot;_top&quot; onClick=&quot;MM_nbGroup('down','group1','contact','',1)&quot; onMouseOver=&quot;MM_nbGroup('over','contact','images/oms_html_07over.gif','',1)&quot; onMouseOut=&quot;MM_nbGroup('out')&quot;><img src=&quot;images/oms_html_07.gif&quot; alt=&quot;&quot; name=&quot;contact&quot; width=&quot;100&quot; height=&quot;35&quot; border=&quot;0&quot; onload=&quot;&quot;></a></td>
<td> <IMG SRC=&quot;images/oms_html_08.gif&quot; WIDTH=260 HEIGHT=35 ALT=&quot;&quot;></TD>
<td width=&quot;100%&quot; align=&quot;left&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; background=&quot;images/spacer3.gif&quot;></td>
</TR>
</TABLE>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD width=&quot;760&quot; height=&quot;125&quot; background=&quot;images/oms_html_09.gif&quot;></TD>
<td width=&quot;100%&quot; align=&quot;left&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; background=&quot;images/spacer4.gif&quot;></td>
</TR>
</TABLE>



Why is the one in blue collapsing the the left, I don't get it..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
Hi,
Firstly why have you specified cellpadding and cellspacing for a cell? This should be set only for the table.

Secondly the one in blue you last posted probably collapses because there is no content in it?? If you place you background image IN the table but not as a background it should hold the structure of the table.


É

:: ::
 
Good point Cian. Nothing in the cell!

Leave the background image as a background if you like, but at least put a &quot;& n b s p ;&quot; in the cell to have something there. IE is generally forgiving with this but Netscape doesn't show cell backgrounds without content in the cells. Especially older browser versions. I spaced the letters in the &quot;& n b s p ;&quot; so it would show up here. Otherwise it just appears as a space. Wish I knew more sometimes!

Try this...

<TABLE WIDTH=&quot;100%&quot; BORDER=&quot;0&quot; CELLPADDING=&quot;0&quot; CELLSPACING=&quot;0&quot;>
  <TR>
    <TD width=&quot;760&quot; height=&quot;125&quot; background=&quot;images/oms_html_09.gif&quot;>& n b s p ;</TD>
    <td width=&quot;100%&quot; align=&quot;left&quot; background=&quot;images/spacer4.gif&quot;>& n b s p ;</td>
    </TR>
</TABLE>

Or, make a 1px x 1px transparent gif and keep it a spacer. I use one and just call it &quot;spacer.gif&quot;. Resize it with the code to hold any position. You can even use the 1px x 1px at its normal size and use some vspace or hspace to help out sometimes.

<TABLE WIDTH=&quot;100%&quot; BORDER=&quot;0&quot; CELLPADDING=&quot;0&quot; CELLSPACING=&quot;0&quot;>
  <TR>
    <TD width=&quot;760&quot; height=&quot;125&quot; background=&quot;images/oms_html_09.gif&quot;><img border=&quot;0&quot; src=&quot;images/spacer.gif&quot; width=&quot;760&quot; height=&quot;1&quot;></TD>
    <td width=&quot;100%&quot; align=&quot;left&quot; background=&quot;images/spacer4.gif&quot;><img border=&quot;0&quot; src=&quot;images/spacer.gif&quot; width=&quot;100%&quot; height=&quot;1&quot;><br>CONTENT GOES HERE</td>
    </TR>
</TABLE>

Of course, the 760 pixel width of the first table is pretty wide anyway. And I still stay away from using &quot;100%&quot; for my widths. I like to use pixels. I know what it will look like everywhere then. Bet hell, I am still only building things 600 pixels wide max!

Well, I hope this helped somewhat.


-----------------------------------------------
These are endless galaxies which are yours.
You can journey to infinity
through the endless passages of the cosmos.
Even better. This all belongs to you.
This is your mind.
 
Good idea! I was supposed to type that after my rant about the page being too wide but I forgot!

Thanks cian! -----------------------------------------------
These are endless galaxies which are yours.
You can journey to infinity
through the endless passages of the cosmos.
Even better. This all belongs to you.
This is your mind.
 
Don't mix absolute widths (pixels) with screen percentage widths - the two don't play well together!

Also, unlike <td height= which will set the height of the cell even if it's empty, <td width= won't do anything without putting something in the cell. Best bet is to create a transparent .gif and set it's size to 1 pixel high and the width to what you need. There's always a better way...
 
Thanks guys, got her fixed up now..All your suggestions worked out well..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top