How would I code this.

blackknights

New Member
Evening everyone I need a little assistance in coding this correctly. Basically I want to add two amber alert tickers one Canadian and one USA into my header. Not sure how to accomplish this each time I have attempted this it is placed below header
I have attached both scripts for amber alert as well as header template. Now i would like to have the canadian to the right of the nav bar and USA to the left if that is possible. Image capture of header attached.
Thanks in advance.

Canadaian Amber Alert
Code:
<!-- Begin Code Amber Ticker code. -->
<p align="center">
<script language="JavaScript1.2" src="http://www.codeamber.org/js/cahcodea.js">
</script>
</P>
<!-- end of Code Amber Ticker code (c)Copyright codeamber.org 2002 - 2008-->

USA Amber Alert
Code:
<!-- Begin Code Amber Ticker code. -->
<p align="center">
<script language="JavaScript1.2" src="http://www.codeamber.org/js/hcodea.js">
</script>
</P>
<!-- end of Code Amber Ticker code (c)Copyright codeamber.org 2002 - 2008-->

This is the header template
Code:
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="height: 177px; background-color: #030107; background-image:url($stylevar[imgdir_misc]/header_banner.jpg); background-repeat:no-repeat; background-position:left;"></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="height: 22px; background-image:url($stylevar[imgdir_misc]/header_split.gif);"></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="middle" style="height: 52px; vertical-align:middle; background-image:url($stylevar[imgdir_misc]/links_b.gif);"><div align="center" class="headlinks"><a href="index.php">Home</a>  | <a href="usercp.php">User Cp</a>  | <a href="register.php">Register</a>  |<a href="memberlist.php"> Members  </a>| <a href="search.php">Search</a>  | <a href="faq.php">Faq</a></div></td>
  </tr>
</table>


<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="height: 7px; background-image:url($stylevar[imgdir_misc]/links_under_bg.gif);"></td>
  </tr>
</table>

<!-- content table -->
$spacer_open

$_phpinclude_output
 
Here is the requested code in the Muggled theme..good thing I had it installed copy this code and replace your entire header code with it.

HTML:
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="background-image:url($stylevar[imgdir_misc]/border_left.gif); width: 22px;"></td>
    <td>

  <tr>
    <td style="height: 177px; background-color: #030107; background-image:url($stylevar[imgdir_misc]/header_banner.jpg); background-repeat:no-repeat; background-position:left;"></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="height: 22px; background-image:url($stylevar[imgdir_misc]/header_split.gif);"></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="middle" style="height: 52px; vertical-align:middle; background-image:url($stylevar[imgdir_misc]/links_b.gif);"><div align="center" class="headlinks"></div>
<script language="JavaScript" src="http://www.codeamber.org/js/cahcodea.js">
</script></a> |
<a href="index.php">Home</a>  | <a href="usercp.php">User Cp</a>  | <a href="register.php">Register</a>  |<a href="memberlist.php"> Members  </a>| <a href="search.php">Search</a>  | <a href="faq.php">Faq</a> | <script language="JavaScript" src="http://www.codeamber.org/js/hcodea.js">
</script>
</div></td>

 
</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="height: 7px; background-image:url($stylevar[imgdir_misc]/links_under_bg.gif);"></td>
  </tr>
</table>

<!-- content table -->
$spacer_open

$_phpinclude_output
 
Thanks for the reply although this did not fix my issue I have attached a new header image for you to see. The amber alerts are both on the right where I wish to have them separated by the Navbar (Canadian to the left and USA to the right of Navbar. In your coding I see that that's what you attempted to do but both revert to left side and the second one doesn't pull the feed (not sure why but if these end up in the same spot one cancels the other.
Any thoughts.
 
my code is correct as it is running on my site with no errors that is why I copied the entire header code and pasted it.

here is the proof...I dont know if you added anything or what mods you have but on my site with the provided code it works
 
hey filez yes that code is correct I just looked at it through explorer and working as stated but under Firefox it is showing as i described is there any way to display correct in both? Thanks for your continued effort in this.
 
that im not sure I dont use firefox...sorry maybe someone can take what I did and convert it in firefox.
 
ok thanks for the assistance in this and not giving up on this little project. For those that have looked in on this according what I have found on the net by adding this to the header

Code:
<div class="c" id="codeamber">
<script type="text/javascript" src="http://www.codeamber.org/js/codea.js">
</script>
</div>

and this to the extra CSS

Code:
#codeamber {
width: 425px;
margin-left: auto;
margin-right: auto;
}

Which should solve the problem.

"from the author of this info "Sorry I was very distracted with other pressing issues yesterday and never gotta chance to expand on your solution.

After I inserted the Code you provided, I began to wonder why did that work and nothing I tried prior ? Well the answer was right in front of my face, CSS Styles requires Style Rules and given I previously mentioned I inserted my previous Code in a DW document and it worked just fine, that was simply because I started a fresh page that created new rules as I went along, the Zeta's Style Sheets are prearranged and to introduce a javascript with properties other than their simple function such as positioning, requires establishing a rule for that property that apparently Garath531 recognized.

Once again, thank you .. I'm noticing that the script isn't perfectly centered and the border around the Ticker is a tad larger than I want so I'm going to try to tweak it some more .."

Now filez is helping on this and we are trying to figure out how to display Cnadian and USA version in the header at the same time as one cancels out when the other is present as well as the spacing issue.

Any thoughts?
 
Back
Top