Reply
Tables - Scrollbars - DIV tags...
Old 04-23-2006, 11:48 PM Tables - Scrollbars - DIV tags...
Novice Talker

Posts: 8
Hey everyone! I've almost finished my site (still have to make an image map). I'm about to put content in but I have one.. big.. issue...

MY TABLES!!!!!!!!!

MY "content" table needs a scrollbar. I want it to stay the height it is, and not expand when a lot of text is put in... therefore I need it to scroll. But everytime I try to figure out how the <DIV> tags would work with my already done table... my table ends up inside the scrollbar box... rather than being part of it. If that makes any sense?

Basically i want the table I have now, to scroll. I want it to look the way it does (plus a scrollbar off to the right).

here's the site... http://www.geocities.com/rev_groove/index.htm
Kishawnya is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-24-2006, 05:45 PM Re: Tables - Scrollbars - DIV tags...
Silent77's Avatar
Ultra Talker

Posts: 255
Name: Silent
Location: Ohio
I'm pretty sure you can do that with an iframe... if you wanted to.
__________________
Firefox
rediscover the web
Get Firefox today it's free! Down with internet explorer!
Silent77 is offline
Reply With Quote
View Public Profile Visit Silent77's homepage!
 
Old 04-24-2006, 09:33 PM Re: Tables - Scrollbars - DIV tags...
Novice Talker

Posts: 8
what exactly is an iframe?
Kishawnya is offline
Reply With Quote
View Public Profile
 
Old 04-25-2006, 06:09 PM Re: Tables - Scrollbars - DIV tags...
Silent77's Avatar
Ultra Talker

Posts: 255
Name: Silent
Location: Ohio
Here is a great site for iframes. http://www.htmlcodetutorial.com/frames/_IFRAME.html
btw Im pretty sure they work for all browsers

Hope this helps
__________________
Firefox
rediscover the web
Get Firefox today it's free! Down with internet explorer!
Silent77 is offline
Reply With Quote
View Public Profile Visit Silent77's homepage!
 
Old 04-25-2006, 09:11 PM Re: Tables - Scrollbars - DIV tags...
Super Talker

Posts: 116
yeah iframes (inline frames) r the only method i can think of to get a scroll bar... that or FLASH, but then u need some crazy actionscript to make it editable n stuff...

iframes dont always work tho, so make sure u try it on all the popular browsers (IE, mozilla, etc)
nasaboy007 is offline
Reply With Quote
View Public Profile Visit nasaboy007's homepage!
 
Old 04-25-2006, 09:50 PM Re: Tables - Scrollbars - DIV tags...
Crimson's Avatar
Novice Talker

Posts: 12
Location: Oregon, USA
Kishawnya: An IFrame could do what you want, but there are drawbacks. IFrames are not very compatible with search engines and various browsers. You're best off using a <div> tag, as you mentioned. It can be done.



Here's how. Put the following HTML in the correct cell, with your content in between the starting and ending DIV tags:

Code:
<div style='height: 365px; overflow: auto;'>
 
...content...
 
</div>
Change the bolded number next to "height:" to the number of pixels high you want the scrollable area to be.

Your cell looks to be 365 pixels high, so I put that in for you, but you might have to play around with the number to get the exact look your going for.

Now, with the above code, the content area will only have scrollbars if it needs them. If there is not enough text to warrent a scrollbar, there will not be one. If you want there to always be a scrollbar, no matter how much content is in the div, you can change overflow: auto to be overflow: scroll.

If you're doing this right, the content area will scroll rather than stretch with the content.

If the scrollable area is appearing outside the content area, you might be working with the wrong cell. Make sure you're putting the above code inside the cell containing <B>Rev. A.J. Groove</B>. (Between the <TD> and </TD> tags.)


Last edited by Crimson : 04-25-2006 at 09:52 PM.
Crimson is offline
Reply With Quote
View Public Profile
 
Old 04-28-2006, 02:33 AM Re: Tables - Scrollbars - DIV tags...
Novice Talker

Posts: 8
THANK YOU THANK YOU THANK!

I can't believe it was that simple... I couldn't for the life of me figure out why it kept not working... go figure!

I do have one more question though....

How the heck do I target, name targets.. etc. I'm going to have an image map navigation and I want it all to open up into that little Div area... I've been playing around with it, but its more complicated then i thought.
Kishawnya is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Tables - Scrollbars - DIV tags...
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.16600 seconds with 12 queries