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!

<DIV> Help... scrolling tables

Status
Not open for further replies.

RonnyM789

Technical User
Nov 6, 2002
13
US
ive got a problem...

<DIV STYLE=&quot;OVERFLOW: AUTO;
WIDTH: 618;
HEIGHT: 700;
BORDER-LEFT: 1PX WHITE SOLID;
BORDER-BOTTOM: 1PX WHITE SOLID;
BORDER-RIGHT: 1PX WHITE SOLID;
BORDER-TOP: 1PX WHITE SOLID;
PADDING:0PX;
MARGIN: 0PX&quot;>

<TABLE
HEIGHT=&quot;900&quot;
CELLSPACING=&quot;0&quot;
CELLPADDING=&quot;0&quot;
BGCOLOR=&quot;#FFFFFF&quot;
BORDERCOLOR=&quot;FFFFFF&quot;
WIDTH=&quot;600&quot;
BORDER=&quot;1&quot;>

</DIV>

Here is a sample piece of code and im having a difficult time. I want 1 table inside of the scrolled table but outside of it i want another table. but everytime i try to get a table outside of it, it goes straight into the scrolled table. whats going on? it sounds confusing... so if u didnt get it ill try to clarify.

- i want 1 or a few tables to be inside of the scrolled area.

- everytime i try to get it out of the scrolled table it goes into it.

- how do i end the scrolled table so that it will eventually go on instead of going right back into it? all the code that i place after (the piece of code up top) goes into the scrolled table. PLEASE HELP~~!

thanks,
Ron
 
Try putting the scrolling table into a separate html file, then putting an <iframe src=&quot;scrolltable.html&quot;></iframe> tag into the cell where you want it to sit.
 
I tried it and it just gives me 2 scrollbars... how do i get rid of one and keep the color that i like?

i have never used iframe before
 
The iframe will give you a scrollbar so you'd need to remove the scrollbar on the div.

The example you posted will not work but what you are trying to do is not difficult.

Here's the code you posted above only reworked.
1. you forgot dimensional units
2. make sure no xhtml doctype or table height won't work
3. redefinition of border
4. removed dimensional units from margin:0 and padding:0
5. finish the table code

Copy and paste this, see if it's what you are looking for:
Text outside the box

<div style=&quot;overflow: auto; width: 618px; height: 700px; border: 1px white solid; padding: 0; margin: 0;&quot;>

<table summary=&quot;&quot; height=&quot;900&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#ffffff&quot; bordercolor=&quot;ffffff&quot; width=&quot;600&quot; border=&quot;1&quot;>
<tr>
<td>Inside the box</td>
</tr>
</table>

</div>

Text outside the box


Note also, you shouldn't have bordercolor or height in the table code, even though it works.




 
i think i got it but im having a simple problem...

whenever i use a new <TR> it wont let me have the scrollable table... i dont know whats up...


<TABLE
WIDTH=&quot;618&quot;
HEIGHT=&quot;625&quot;
BORDER=&quot;1&quot;
BORDERCOLOR=&quot;43C9F5&quot;>
<TR>
<TD>

<DIV STYLE=&quot;OVERFLOW: AUTO;
WIDTH: 618;
HEIGHT: 700;
BORDER-LEFT: 1PX WHITE SOLID;
BORDER-BOTTOM: 1PX WHITE SOLID;
BORDER-RIGHT: 1PX WHITE SOLID;
BORDER-TOP: 1PX WHITE SOLID;
PADDING:0PX;
MARGIN: 0PX&quot;>

<!--INSIDE THE MIDDLE PIECE-->

<TABLE
HEIGHT=&quot;300&quot;
CELLSPACING=&quot;0&quot;
CELLPADDING=&quot;0&quot;
BGCOLOR=&quot;#FFFFFF&quot;
BORDERCOLOR=&quot;FFFFFF&quot;
WIDTH=&quot;600&quot;
BORDER=&quot;1&quot;>

<TR VALIGN=&quot;TOP&quot;>
<TD><FONT COLOR=&quot;000000&quot; FACE=&quot;VERDANA&quot; SIZE=&quot;1&quot;>
<P>H i g h l i g h t s ~ <HR WIDTH=100% HEIGHT=&quot;1&quot; COLOR=&quot;43C9F5&quot;>
<IMG SRC=&quot;C:\Documents and Settings\Administrator.RONNY-BJ939MXTV\My Documents\html stuff\useful pics\akdongclub2.jpg&quot; WIDTH=&quot;120&quot; HEIGHT=&quot;100&quot;>
<IMG SRC=&quot;C:\Documents and Settings\Administrator.RONNY-BJ939MXTV\My Documents\html stuff\useful pics\chataehyun2.jpg&quot; WIDTH=&quot;120&quot; HEIGHT=&quot;100&quot;>
<IMG SRC=&quot;C:\Documents and Settings\Administrator.RONNY-BJ939MXTV\My Documents\html stuff\useful pics\take1.jpg&quot; WIDTH=&quot;120&quot; HEIGHT=&quot;100&quot;>
</TD>
</TR>


<TR VALIGN=&quot;TOP&quot;>
<TD>
<FONT COLOR=&quot;000000&quot; FACE=&quot;VERDANA&quot; SIZE=&quot;1&quot;>
<P>R e c e n t ~ N e w s (Kpop)~ <I>Posted on May 12<SUP>th</SUP></I><HR WIDTH=100% HEIGHT=&quot;1&quot; COLOR=&quot;43C9F5&quot;>
<B>The Fake Hyori</B><BR>
<P><IMG SRC=&quot;C:\Documents and Settings\Administrator.RONNY-BJ939MXTV\My Documents\html stuff\useful pics\fakehyori.jpg&quot; WIDTH=&quot;120&quot; HEIGHT=&quot;100&quot;>
A recent incident underlined both the worldwide popularity of Kpop
and the scary prowess of the Internet. It started roughly about 1 month
ago between an African American who was convinced that
he had been talking to FinkL. He had flown to the KBS headquarters
demanding to meet Lee Hyori from FinkL. The man flew from America
so he was not about to give up because he had &quot;talked&quot; to her
on the internet. He was confronted by Hyori's manager after
the 3<SUP>rd</SUP> try of meeding this star. Then she came out
to talk to the African-American and she told him that he was talking
to an imposter. He was told to fly back home and he did. He flew 10,000
miles for nothing to just to see if he was actually talking to her.
He flew home disappointed and he finally got the message that
she was not the one who was talking to him over the internet.
</P>
</TD>
</TR>

<TR VALIGN=&quot;TOP&quot;>
<TD>
<FONT COLOR=&quot;000000&quot; FACE=&quot;VERDANA&quot; SIZE=&quot;1&quot;>
<P>I r a q i ~ N e w s ~ <I>Posted May 15<SUP>th</SUP>(yahoo.com)</I>
<HR WIDTH=&quot;100%&quot; HEIGHT=&quot;1&quot; COLOR=&quot;43C9F5&quot;>
<B>Blast Kills 1 before Powell Saudis Visit</B><BR>
Hours before a visit by the American secretary of state,
attackers shot their way into three compounds housing
Westerners and Saudis and set off car bombs. At least
one person was killed and 60 were injured, hospital and
security officials said.




</DIV>
</TR>
</TD>
</TABLE>


thats my coding... could anyone tell me what is wrong with it? or another way to do it... i was thinking to use iframes
and put it into a cell. plz someone direct me in the proper way. thanks

-Ron
 
First thing, use small case for your code, not capital letters! Secondly, table formatting, clean it up.

There's a number of mistakes which I corrected before and you have put them back in. I'll correct them again but what's the point in making them wrong again?

I removed the outer table height, don't see the need for that. Also remember, you have the div set to auto scroll so it won't actually show the scrollbar unless the content is bigger than what you set. I have now set the div height to 500px.



<table width=&quot;618&quot; border=&quot;1&quot; summary=&quot;&quot; bordercolor=&quot;#43c9f5&quot;>
<tr>
<td valign=&quot;top&quot;>
<div
style=&quot;overflow: auto; width: 618px; height: 500px; border: 1px white solid; padding:0; margin: 0&quot;>
<!--inside the middle piece-->

<table height=&quot;300&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; summary=&quot;&quot;
bgcolor=&quot;white&quot; bordercolor=&quot;#ffffff&quot; width=&quot;600&quot; border=&quot;1&quot;>
<tr valign=&quot;top&quot;>
<td>
<p><font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;1&quot;>h i g h l i g h t
s ~</font></p>

<hr width=&quot;100%&quot; height=&quot;1&quot; color=&quot;#43c9f5&quot; />
<font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;1&quot;><img alt=&quot;&quot;
src=&quot;c:/documents%20and%20settings/administrator.ronny-bj939mxtv/my%20documents/html%20stuff/useful%20pics/akdongclub2.jpg&quot;
width=&quot;120&quot; height=&quot;100&quot; /> <img alt=&quot;&quot;
src=&quot;c:/documents%20and%20settings/administrator.ronny-bj939mxtv/my%20documents/html%20stuff/useful%20pics/chataehyun2.jpg&quot;
width=&quot;120&quot; height=&quot;100&quot; /> <img alt=&quot;&quot;
src=&quot;c:/documents%20and%20settings/administrator.ronny-bj939mxtv/my%20documents/html%20stuff/useful%20pics/take1.jpg&quot;
width=&quot;120&quot; height=&quot;100&quot; /></font></td>
</tr>

<tr valign=&quot;top&quot;>
<td>
<p><font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;1&quot;>r e c e n t ~ n e
w s (kpop)~ <i>posted on may 12<sup>th</sup></i></font></p>

<hr width=&quot;100%&quot; height=&quot;1&quot; color=&quot;#43c9f5&quot; />
<font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;1&quot;><b>the fake
hyori</b><br />
</font>
<p><font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;1&quot;><img alt=&quot;&quot;
src=&quot;c:/documents%20and%20settings/administrator.ronny-bj939mxtv/my%20documents/html%20stuff/useful%20pics/fakehyori.jpg&quot;
width=&quot;120&quot; height=&quot;100&quot; /> a recent incident underlined both
the worldwide popularity of kpop and the scary prowess of the
internet. it started roughly about 1 month ago between an african
american who was convinced that he had been talking to finkl. he
had flown to the kbs headquarters demanding to meet lee hyori
from finkl. the man flew from america so he was not about to give
up because he had &quot;talked&quot; to her on the internet. he was
confronted by hyori's manager after the 3<sup>rd</sup> try of
meeding this star. then she came out to talk to the
african-american and she told him that he was talking to an
imposter. he was told to fly back home and he did. he flew 10,000
miles for nothing to just to see if he was actually talking to
her. he flew home disappointed and he finally got the message
that she was not the one who was talking to him over the
internet.</font></p>

</td>
</tr>

<tr valign=&quot;top&quot;>
<td>
<p><font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;1&quot;>i r a q i ~ n e w
s ~ <i>posted may 15<sup>th</sup>(yahoo.com)</i></font></p>

<hr width=&quot;100%&quot; height=&quot;1&quot; color=&quot;#43c9f5&quot; />
<font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;1&quot;><b>blast kills 1
before powell saudis visit</b><br />
hours before a visit by the american secretary of state,
attackers shot their way into three compounds housing westerners
and saudis and set off car bombs. at least one person was killed
and 60 were injured, hospital and security officials
said.</font></td>
</tr>
</table>
</div>
</td>
</tr>
</table>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top