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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I want to have a 100px or so

Status
Not open for further replies.

myatia

Programmer
Nov 21, 2002
232
Hi,

I want to have a 100px or so white border at the top of a page stretch the full width of the page. Obviously, <TABLE WIDTH=&quot;100%&quot;> will do this *in the viewable area*. The problem is, I have a table in the page with a width of 800px. If the window is changed to a width less than that, then a scrollbar appears at the bottom. If one scrolls to the right, the border at the top is cut off at the point of what was viewable in the page at the original window size. To see what's happening, please see


or look at the code below. Any help would be appreciated.

Thanks,

Misty


Code:
/* TABLE STYLE SHEET */
TABLE.brandbar {
  margin-bottom: 6px;
  margin-top:0px;
  margin-right:0px;
  width:100%;
}

Code:
<!-- TABLE CODE -->
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 
 WIDTH=&quot;100%&quot; CLASS=&quot;brandbar&quot;>
   <TR WIDTH=&quot;100%&quot; BGCOLOR=&quot;white&quot;>
      <TD BGCOLOR=&quot;White&quot;>
         <IMG SRC=&quot;images/template/HFTlogo.gif&quot; WIDTH=&quot;225&quot; 
         HEIGHT=&quot;78&quot; BORDER=&quot;0&quot;></TD>
      <TD ALIGN=&quot;right&quot; BGCOLOR=&quot;White&quot;>
         <P CLASS=&quot;brandbar&quot;>
         <A HREF=&quot;[URL unfurl="true"]http://www.chft.com/&quot;>Home</A>[/URL] | 
         <A HREF=&quot;[URL unfurl="true"]http://www.c.com/&quot;>[/URL]
         C Home</A></P></TD>
   </TR>   
   <TR BGCOLOR=&quot;black&quot;>
      <TD HEIGHT=1 COLSPAN=2>
         <IMG SRC=&quot;images/template/spacer.gif&quot; 
         HEIGHT=1 WIDTH=20></TD>
   </TR>
</TABLE>
 
everything looks fine in 800*
the chance of you having a viewer under that resolution these days is fairly slim. I would honestly say living with the scroll at that point would not be a bad thing to let go. _______________________________________________
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

_______________________________________________
for the best results to your questions: FAQ333-2924
has you're questio
 
ahh! sorry have to take that back. I accidentally viewed it in a larger res then 800* and it does get a little out of wack at 800*
from skimming throught the code it looks like you need to next the tables into a main table for the entire page.
try setting the body text table to something like 90% or such. not a good idea to set to 800px for one that you really don't get that out of a 800* res you get like 780 or something to that effect.
for just a example of the nested way I jsut took that table you posted and gave it a header even knwoing I know that table is the header you want. just trying to get the idea there.
<table width=&quot;100%&quot;>
<tr>
<td>
<table width=&quot;100%&quot; bgcolor=&quot;#FFFFFF&quot;>
<tr>
<td align=&quot;center&quot;>Header</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>

<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=&quot;90%&quot;>
<TR WIDTH=&quot;100%&quot; BGCOLOR=&quot;white&quot;>
<TD BGCOLOR=&quot;White&quot;>
<IMG SRC=&quot;images/template/HFTlogo.gif&quot; WIDTH=&quot;225&quot; HEIGHT=&quot;78&quot; BORDER=&quot;0&quot;></TD>
<TD ALIGN=&quot;right&quot; BGCOLOR=&quot;White&quot;>
<P CLASS=&quot;brandbar&quot;>
<A HREF=&quot; |
<A HREF=&quot; C Home</A></P></TD>
</TR>
<TR BGCOLOR=&quot;black&quot;>
<TD HEIGHT=1 COLSPAN=2>
<IMG SRC=&quot;images/template/spacer.gif&quot; HEIGHT=1 WIDTH=20></TD>
</TR>
</TABLE>

</td>
</tr>
</table> _______________________________________________
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

_______________________________________________
for the best results to your questions: FAQ333-2924
has you're questio
 
that's nest not next [lol] _______________________________________________
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

_______________________________________________
for the best results to your questions: FAQ333-2924
has you're questio
 
[lol] deecee

how about the combo of our signatures

[soapbox]
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

sleep is good _______________________________________________
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

_______________________________________________
for the best results to your questions: FAQ333-2924
has you're questio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top