1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

need some more joomla help....

Discussion in 'HTML & Website Design' started by tyguy, May 15, 2007.

Thread Status:
Not open for further replies.
  1. #1
    I am havin some trouble centering my menu in joomla. Here is my code. I already have align"centeR" in the table. It works fine in the forum but not on the home page.

    <?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo _LANGUAGE; ?>">
    <head>
    <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
    <?php 
    if ( $my->id ) {
    initEditor();
    }
    mosShowHead();?>
    
    <link href="templates/<?php echo $cur_template; ?>/css/template_css.css" rel="stylesheet" type="text/css" media="screen" />
    <?php 
    if (mosCountModules('left') <=0) $style = "_no_left";
    if (mosCountModules('right') <=0) $style = "_no_right";
    if (mosCountModules('left') + mosCountModules('right') <=0) $style = "_full";
    if (mosCountModules('left') && mosCountModules('right')) $style = "";
    ?>
    <script language="javascript" type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate();?>/js/styleswitcher.js"></script>
    <script language="javascript" type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate();?>/js/matching_columns.js"></script>
    <!--[if lt IE 7]>
    <script type="text/javascript" language="javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $cur_template;?>/js/iehover.js"></script>
    <![endif]-->
    
    <script type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    </head>
    
    <body onload="MM_preloadImages('images/index2_01.gif','images/index2_02.gif','images/index2_03.gif','images/index2_04.gif','images/index2_05.gif','images/index2_07.gif','images/index_07.gif')">
    
    <script type="text/javascript">js_init();</script>
    	<div id="header">
    		<h1><a href="<?php echo $mosConfig_live_site;?>"><?php echo $mosConfig_sitename; ?></a></h1>
    		<?php if (mosCountModules('top')) { ?>
    			<div id="tabmenu">
    				<?php mosLoadModules( 'top', -1 );?>
        		</div><!-- end div#tabmenu -->
    		<?php } ?>
    	</div><!-- end div#header -->
    	
    	<div id="navbar">
    	
    		<?php if (mosCountModules('user1')) { ?>
    			<?php mosLoadModules( 'user1', -1 );?>
    		<?php } ?>
    <table id="Table_01" width="625" height="46" border="0" cellpadding="0" cellspacing="0" align="center">
    	<tr>
    		<td><a href="http://www.cellphoner.net" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','images/index2_01.gif',1)"><img src="images/index_01.gif" alt="Cell Phones" name="Image9" width="77" height="46" border="0" id="Image9" /></a></td>
    		<td><a href="http://www.cellphoner.net/forums" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','images/index2_02.gif',1)"><img src="images/index_02.gif" alt="Cell Phone Forums" name="Image10" width="80" height="46" border="0" id="Image10" /></a></td>
    		<td><a href="http://www.cellphoner.net/store" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','images/index2_03.gif',1)"><img src="images/index_03.gif" alt="Cell Phone Store" name="Image11" width="80" height="46" border="0" id="Image11" /></a></td>
    		<td><a href="http://www.cellphoner.net/reviews" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','images/index2_04.gif',1)"><img src="images/index_04.gif" alt="Cell Phone Reviews" name="Image12" width="97" height="46" border="0" id="Image12" /></a></td>
    		<td><a href="http://www.cellphoner.net/links" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','images/index2_05.gif',1)"><img src="images/index_05.gif" alt="Cell Phone Links" name="Image13" width="82" height="46" border="0" id="Image13" /></a></td>
    		<td>
    			<img src="images/index_06.gif" width="3" height="46" alt=""></td>
    		<td><a href="http://www.tkqlhce.com/click-2279777-10468856" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','images/index_07.gif',1)"><img src="images/index_07.gif" alt="Cell Phone Ringtones" name="Image14" width="114" height="46" border="0" id="Image14" /></a><a href="http://www.dpbolvw.net/click-2279777-10468856" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','images/index2_07.gif',1)"></a></td>
    		<td>
    			<img src="images/index_08.gif" width="3" height="46" alt=""></td>
    		<td><a href="http://www.cellphoner.net/blog" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','images/index2_09.gif',0)"><img src="images/index_09.gif" alt="Cell Phone Blog" name="Image15" width="89" height="46" border="0" id="Image15" /></a></td>
    	</tr>
    </table>
    	</div><!-- end div#navbar -->
    	
    	<div id="main_content_wrapper">
    		<div id="wrap">
    		
    			<?php if (mosCountModules('left')) { ?>
    			<div id="left_sidebar" class="column">
    				<?php mosLoadModules( 'left', -2 );?>
        		</div><!-- end div#left_sidebar -->
    			<?php } ?>
    		
    			<div id="main_content<?php echo $style; ?>" class="column">
    				<?php mosMainBody(); ?>
    			</div><!-- end div#main_content -->
    		
    			<?php if (mosCountModules('right')) { ?>
    			<div id="right_sidebar" class="column">
    				<?php mosLoadModules( 'right', -2 );?>
        		</div><!-- end div#right_sidebar -->
    			<?php } ?>
    			
    			<?php if (mosCountModules('footer')) { ?>
    			<div id="footer">
    				<?php mosLoadModules( 'footer', -2 );?>
        		</div><!-- end div#footer -->
    			<?php } ?>
    			
    			<div id="designer">
    				<a href="http://www.cellphoner.net">Home</a>-<a href="http://www.cellphoner.net/sitemap.xml">Sitemap</a>
    <p>Copyright Cellphoner.net 2007</p>
    			</div>
    			
    		</div><!-- end div#wrap -->
    	</div><!-- end div#main_content_wrapper -->
    	<?php include($mosConfig_absolute_path."/templates/" . $mainframe->getTemplate() . "/js/template.css.php"); ?>
    </body>
    </html>
    Code (markup):

     
    tyguy, May 15, 2007 IP
  2. webdesigner

    webdesigner Well-Known Member

    Messages:
    489
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Adding align="center" to the navbar seems to do the trick

    REPLACE: <div id="navbar">
    WITH: <div align="center" id="navbar">
     
    webdesigner, May 16, 2007 IP
    tyguy likes this.
  3. tyguy

    tyguy Banned

    Messages:
    169
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks alot!
     
    tyguy, May 16, 2007 IP
Thread Status:
Not open for further replies.