Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 09-05-2009, 06:58 AM   #1 (permalink)
Junior Member
 
Join Date: 09-05-09
Posts: 1
iTrader: 0 / 0%
Latest Blog:
None

bazzab is liked by many
Post Help needed when using TabContent and scrollable content

Hi All,

I have recently made a site with tabs but want to add scrollable dynamic content to one of the tabs due to the amount of content in that tab. As you may all be aware tabs have to use
Code:
display:none;
in the css to hide all but the first tab. However when using this my scrollable content does not work. When i remove this rule my scrollable content works but I then have the issue with all the tabs being displayed when first loaded.

Does anyone know how I can get around this?

I have included the scroll script (taken from Dynamic Drive) below just incase any amendments have to be done to that rather than my css.

Code:
<script type="text/javascript"> /****************************************** * Scrollable content script II- © Dynamic Drive (www.dynamicdrive.com) * Visit http://www.dynamicdrive.com/ for full source code * This notice must stay intact for use ******************************************/ iens6=document.all||document.getElementById ns4=document.layers //specify speed of scroll (greater=faster) var speed=5 </script> <div id="container" style="position:relative; width:175px; height:160px; border:1px solid black; overflow:hidden;"> <div id="content" style="position:absolute;width:170px;left:0;top:0;"> <ilayer name="nscontainer" width=175 height=160 clip="0,0,175,160"> <layer name="nscontent" width=175 height=160 visibility=hidden> <!--INSERT CONTENT HERE--> <p><font size="2" face="Arial">-</font><font size="2" face="Arial"> DHTML is the combination of HTML, JavaScript, and CSS</font></p> <p><font size="2" face="Arial">- DOM stands for Document Object Model</font></p> <p><font size="2" face="Arial">-</font><font size="2" face="Arial"> DHTML allows content on a page to change on the fly, without reloading the page</font></p> <p><font size="2" face="Arial">- CSS allows for the separation between content definition and formatting</font></p> <p><font size="2" face="Arial">- CSS stands for Cascading style sheet</font></p> <p><font size="2" face="Arial">- </font><font size="2" face="Arial"><a href="http://www.dynamicdrive.com">Dynamic Drive</a> provides free, cut and paste DHTML scripts</font></p> <!--END CONTENT--> </layer> </ilayer> </div> </div> <table width="175px"><td><p align="right"> <a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a> <a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="down.gif" border=0></a></p></td> </table> <script language="JavaScript1.2"> if (iens6){ var crossobj=document.getElementById? document.getElementById("content") : document.all.content var contentheight=crossobj.offsetHeight } else if (ns4){ var crossobj=document.nscontainer.document.nscontent var contentheight=crossobj.clip.height } function movedown(){ if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100)) crossobj.style.top=parseInt(crossobj.style.top)-speed+"px" else if (ns4&&crossobj.top>=(contentheight*(-1)+100)) crossobj.top-=speed movedownvar=setTimeout("movedown()",20) } function moveup(){ if (iens6&&parseInt(crossobj.style.top)<=0) crossobj.style.top=parseInt(crossobj.style.top)+speed+"px" else if (ns4&&crossobj.top<=0) crossobj.top+=speed moveupvar=setTimeout("moveup()",20) } function getcontent_height(){ if (iens6) contentheight=crossobj.offsetHeight else if (ns4) document.nscontainer.document.nscontent.visibility="show" } window.onload=getcontent_height </script>
bazzab is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply

Tags
css, display:none, tabcontent


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Writers Needed for Long-Term Project profecy Content 14 04-03-2009 02:12 AM
Assistance Needed on Content Management digitaloverlay Web Hosting Forum 3 03-06-2008 08:08 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 06:52 PM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.