Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
Header Issues
Topic Started: Sep 17 2011, 09:25 PM (619 Views)
KoruptOne
Member
[ * ]
I am using the default theme that comes with the forum. In the header area I am trying to have my logo left aligned as it normally would be. Off to the right I am trying to have banner ads that are random per page refresh. Here is the code I am using and my alignment is way off. What am I doing wrong? If a screenshot of how I need it to look is needed please let me know. Thank you!

My board can be found here: http://s4.zetaboards.com/DE_Tuners/index/

Code:
 

<br><div align="right" valign="middle"><img src="http://koruptart.com/detuners/logo.png" alt="ZetaBoards" align="left"><script type="text/javascript">
//<![CDATA[
ads=[];n=0
ads[n++]=["http://www.jnztuning.net","http://www.tristatetuners.com/images/bigvendorbanners/215motoring468x60.jpg"];
ads[n++]=["http://www.gvautosport.com","http://www.tristatetuners.com/images/bigvendorbanners/215motoring468x60.jpg"];
num=Math.floor(Math.random()*ads.length);
document.write("<right><a href='"+ads[num][0]+"'><img src='"+ads[num][1]+"'/></a></right>");
//]]>
</script>
<br>

OK so I fixed the spacing issues with the following code. The only problem I am having now is getting the banner to align right. Could someone please help with this? Thank you in advance.

Code:
 

<img src="http://koruptart.com/detuners/logo.png" valign="middle">
<script type="text/javascript">
//<![CDATA[
ads=[];n=0
ads[n++]=["http://www.jnztuning.net","http://www.tristatetuners.com/images/bigvendorbanners/215motoring468x60.jpg"];
ads[n++]=["http://www.gvautosport.com","http://www.tristatetuners.com/images/bigvendorbanners/215motoring468x60.jpg"];
num=Math.floor(Math.random()*ads.length);
document.write("<right><a href='"+ads[num][0]+"'><img src='"+ads[num][1]+"'/></a></right>");
//]]>
</script>
Edited by KoruptOne, Sep 17 2011, 10:12 PM.
Offline Profile Quote Post Goto Top
 
Pete B
Member
[ *  *  *  *  *  *  *  * ]
Hi,

<right> is not valid HTML. For the document write contents use this instead:

Code:
 
<div style="float:right;margin:5px;"><a href="http://www.jnztuning.net"><img src="http://www.tristatetuners.com/images/bigvendorbanners/215motoring468x60.jpg"></a></div>


Pete
Edited by Pete B, Sep 18 2011, 10:41 AM.
Offline Profile Quote Post Goto Top
 
KoruptOne
Member
[ * ]
Thank you Pete. That code did help, but it wasn't the complete answer, because I needed the banner to rotate and each banner needs to link to a specific site.

I was able to get it how I wanted with the following code. If anyone has a better solution let me know because I know my way isn't completely right, but it did work.

Code:
 

<br>  <img src="http://koruptart.com/detuners/logo.png" valign="middle">
<div style="float:right;margin5px;">
<script type="text/javascript">
//<![CDATA[
ads=[];n=0
ads[n++]=["http://www.jnztuning.net","http://www.tristatetuners.com/images/bigvendorbanners/215motoring468x60.jpg"];
ads[n++]=["http://www.gvautosport.com","http://www.tristatetuners.com/images/bigvendorbanners/215motoring468x60.jpg"];
num=Math.floor(Math.random()*ads.length);
document.write("<a href='"+ads[num][0]+"'><img src='"+ads[num][1]+"'/></a>");
//]]>
</script>  </div>

Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards - Theme & Code Support · Next Topic »
Add Reply