1) Script Title: Billboard
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...lbillboard.htm
3) Describe problem: What command and where in the code would I insert, a command to make the output text center itself regardless of the screen resolution it's being viewed in? I have an anime forum and happened on to a transparent theme with no logo header. This script seems to fit in with the transpareticy of the theme. But the main issue is how to make it center up.
I am using VB 3.8.1 also and have inserted this script in the HEAD in the CSS page. Worked first time out by the way. I have make some suttle changes to the scriot such as adding a font-size and margin.
The following code includes the VB code for the head that was included with the theme:
www.animeappeal.com That link will get you there. In the lower left corner is a theme selector. Select the Transparencity theme to see the script working.Code:<style type="text/css"> /*Modify attributes of #contentwrapper below as desired*/ #contentwrapper{ width: 890px; height: 60px; !-border: 1px solid black; !-background-color: #FFFFFF; padding: 5px; } .billcontent{ width: 890px; margin-left:20px; display:block; font-size:50px; } </style> <script type="text/javascript"> /*********************************************** * DHTML Billboard script- © Dynamic Drive (www.dynamicdrive.com) * This notice must stay intact for use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ //List of transitional effects to be randomly applied to billboard: var billboardeffects=["GradientWipe(GradientSize=1.0 Duration=0.7)", "Inset", "Iris", "Pixelate(MaxSquare=5 enabled=false)", "RadialWipe", "RandomBars", "Slide(slideStyle='push')", "Spiral", "Stretch", "Strips", "Wheel", "ZigZag"] //var billboardeffects=["Iris"] //Uncomment this line and input one of the effects above (ie: "Iris") for single effect. var tickspeed=2000 //ticker speed in miliseconds (2000=2 seconds) var effectduration=1000 //Transitional effect duration in miliseconds var hidecontent_from_legacy=1 //Should content be hidden in legacy browsers- IE4/NS4 (0=no, 1=yes). var filterid=Math.floor(Math.random()*billboardeffects.length) document.write('<style type="text/css">\n') if (document.getElementById) document.write('.billcontent{display:none;\n'+'filter:progid:DXImageTransform.Microsoft.'+billboardeffects[filterid]+'}\n') else if (hidecontent_from_legacy) document.write('#contentwrapper{display:none;}') document.write('</style>\n') var selectedDiv=0 var totalDivs=0 function contractboard(){ var inc=0 while (document.getElementById("billboard"+inc)){ document.getElementById("billboard"+inc).style.display="none" inc++ } } function expandboard(){ var selectedDivObj=document.getElementById("billboard"+selectedDiv) contractboard() if (selectedDivObj.filters){ if (billboardeffects.length>1){ filterid=Math.floor(Math.random()*billboardeffects.length) selectedDivObj.style.filter="progid:DXImageTransform.Microsoft."+billboardeffects[filterid] } selectedDivObj.filters[0].duration=effectduration/1000 selectedDivObj.filters[0].Apply() } selectedDivObj.style.display="block" if (selectedDivObj.filters) selectedDivObj.filters[0].Play() selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 0 setTimeout("expandboard()",tickspeed) } function startbill(){ while (document.getElementById("billboard"+totalDivs)!=null) totalDivs++ if (document.getElementById("billboard0").filters) tickspeed+=effectduration expandboard() } if (window.addEventListener) window.addEventListener("load", startbill, false) else if (window.attachEvent) window.attachEvent("onload", startbill) else if (document.getElementById) window.onload=startbill </script> <!- End billboard script-> <!-- logo trans --> <a name="top"></a> <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center"> <tr> <!-- <td align="$stylevar[outertablewidth]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td> --> <td align="$stylevar[right]" id="header_right_cell"> <if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else /> </if> </td> </tr> </table> <!-- /logo --> <!-- content table --> $spacer_open $_phpinclude_output $ad_location[ad_header_end] <!- billboard content -> <div id="contentwrapper"> <div id="billboard0" class="billcontent"> WELCOME TO ANIMEAPPEAL.COM </div> <!- <div id="billboard0" class="billcontent" First HTML content goes here. Increment id=billboard by one for every page included. -> </div>



Reply With Quote

Bookmarks