HTML - WEBSITE INFO..please

tlogic

Inactive User
Joined
Nov 24, 2005
Messages
2,805
Reaction score
222
Location
underground
Hi guys,

I'm trying to implement a google adsence code to my html website however when i copy and paste my code into the the 'template.tpl' the ad keeps appearing on the left hand side instead on the right handside, is there a special html command where i can shift the ad to the right hand side of the page

here is my source code of my page:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<TR><TD width="100%"><HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.6000.16643" name=GENERATOR></HEAD>
<BODY>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=head_left><IMG alt="" src="images/head_left.png"></TD>
<TD class=head_main vAlign=center>
<DIV
style="MARGIN-TOP: 10px; FLOAT: left">{$app-&gt;setting-&gt;site_name}
</DIV>
<DIV style="FLOAT: right">
<TABLE cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD><IMG alt="" src="images/stat_box_top_left.png"></TD>
<TD class=stat_box_top></TD>
<TD><IMG alt="" src="images/stat_box_top_right.png"></TD></TR>
<TR>
<TD class=stat_box_left></TD>
<TD class=stat_box_main>{if $is_Glink} <B>##Words Sold##:</B>
{$words_used|number_format|escape} <BR><B>##Available##:</B>
{$words_avail|number_format|escape} {else} <B>##Pixels Sold##:</B>
{$pixels_used|number_format|escape} <BR><B>##Available##:</B>
{$pixels_avail|number_format|escape} {/if} </TD>
<TD class=stat_box_right></TD></TR>
<TR>
<TD><IMG alt="" src="images/stat_box_bot_left.png"></TD>
<TD class=stat_box_bot></TD>
<TD><IMG alt=""
src="images/stat_box_bot_right.png"></TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></TD></TR><TR><TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD class=nav_left><IMG alt="" src="images/nav_left.png"></TD>
<TD class=nav_main align=left><A
href="{url|escape href='/index.php'}">##Home##</A> &nbsp; | &nbsp; {if
$is_Glink}<A href="{url|escape href='/get_words.php'}">##Get Words##</A>
&nbsp; | &nbsp; <A href="{url|escape href='/word_list.php'}">##Word
List##</A>{else}<A href="{url|escape href='/get_pixels.php'}">##Get
Pixels##</A> &nbsp; | &nbsp; <A
href="{url|escape href='/pixel_list.php'}">##Pixel List##</A>{/if} &nbsp;
| &nbsp; <A href="{url|escape href='/tell_a_friend.php'}">##Tell a
Friend##</A> &nbsp; | &nbsp; {if $app-&gt;setting-&gt;link_to_us_enabled}
<A href="{url|escape href='/link_to_us.php'}">##Link to Us##</A> &nbsp; |
&nbsp; {/if} <A href="{url|escape href='/blog.php'}">##Blog##</A> {if
$app-&gt;setting-&gt;rss_feeds_enabled()} &nbsp; | &nbsp; <A
href="{url|escape href='/rss.php'}">##RSS##</A> {/if} &nbsp;
{language_selector} &nbsp; {if $app-&gt;setting-&gt;user_accounts} {if
$smarty.session.user_id}
Welcome,&nbsp;<STRONG>{$smarty.session.first_name} &nbsp;{$smarty.session.last_name}</STRONG>
&nbsp; | &nbsp; <A class=tlinks
href="{url|escape href='/account.php'}">##Your Account##</A> &nbsp; |
&nbsp; <A class=tlinks href="{url|escape href='/logout.php'}">##Log
Out##</A> {else} <A href="{url|escape href='/login.php'}">##Log In##</A>
&nbsp; | &nbsp; <A href="{url|escape href='/signup.php'}">##Create
Account##</A> {/if} {/if}
<TD class=nav_right><IMG alt=""
src="images/nav_right.png"></TD></TR></TBODY></TABLE></TD></TR><TR><TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD class=toolbar_main vAlign=center><BR>&nbsp; <BR>&nbsp; {if $links}
{foreach item=link from=$links} {$link}&nbsp;&nbsp;&nbsp; {/foreach} {/if}
&nbsp; {if $is_Glink eq false} {if $smarty.session.magnify}<A
href="index.php?magnify=0{if $smarty.request.grid>1}&amp;grid={$smarty.request. grid|escape}{/if}">##Magnifier&nbsp;Off##</A>{else}<A
href="index.php?magnify=1{if $smarty.request.grid>1}&amp;grid={$smarty.request. grid|escape}{/if}">##Magnifier&nbsp;On##</A>{/if}&nbsp;
{/if} </TD></TR></TBODY></TABLE></TD></TR></BODY></HTML>

:

below is the google adsence code i'm trying to put in my page.


<script type="text/javascript"><!--
google_ad_client = "pub-8528842442593961";
/* 120x600, created 01/06/08 */
google_ad_slot = "1279157971";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

I'll appreciate any help guys, coz this driving my up the wall.
 
have you tried changing align left to align right?

Thanks for your reply karym6, i havn't tried that yet, all i've done is simply copy and paste the code that google generated for me and pasted it in templates.inc.tpl file, where can i change the align from left to right?
is there a code i can put this in with the google code. This is my first attempt in making a website thats why knowledge is abit rusty in this area.

thanks for your help m8 much appeciated.
 
Find this bit: <TD class=nav_main align=left><A

and change it to:

<TD class=nav_main align=right><A

does it help? I am not sure it will now that I have tried it...
 
Find this bit: <TD class=nav_main align=left><A

and change it to:

<TD class=nav_main align=right><A

does it help? I am not sure it will now that I have tried it...

i found this command:

<DIV style="TEXT-ALIGN: right">

and the ad does move from left to right but when i save it back in and upload the templae back in to the server the webpage comes up blank. I think im on the right path now thanks to you. :proud:
 
do you need to clear a cache on the server at all?

The command you have used would place the whole chunk of code in an area. The use of DIV can control how it is laid out etc.
 
do you need to clear a cache on the server at all?

The command you have used would place the whole chunk of code in an area. The use of DIV can control how it is laid out etc.

yep tried clearing the cache but still no luck the page comes up blank. :-( this is getting on my tits now. think i will give it a rest for a bit know coz i been trying for a few hours now and getting no where, atleast i have manged to position the ad from left to right which is a start thanks to you.
 
Google advords is just a script that dumps data from their site to yours so you can usually position it where you like, do you have the code of the whole page including where you have attempted to place the google script?

If you place the script inbetween a div tag on the site then it will be aligning it with that div... it might be easier to just post the URL, so that you can see the page...
 
If you're using tables to set the layout - which is not recommended by the W3C, but still a popular method - just throw it in a cell that spans multiple rows using the rowspan="number" attribute in the <td> tag e.g. <td rowspan="2">
 
or just use a div tag instead if you can, makes for a tidier page

Would be nice to see all the code mind.
 
or just use a div tag instead if you can, makes for a tidier page

Would be nice to see all the code mind.

If using CSS that would be ideal as you just put it between DIV tags, assign them a class and position it using an external style sheet. However, as the first table sets it self up as 100% width it leaves no room at the sides to do so.

Putting it in the last cell of a table row automatically puts it down the right hand side, unless you need further alignment there is then no need for the DIV tag. Obviously the rowspan is only needed if there are multiple rows.

e.g.
HTML:
You don't have permission to view the code content. Log in or register now.

Personally I'd dump the table layout and use CSS, but I don't know how much work has gone into what you've got.
 
Back
Top