Back to top

Autore Topic: centrare layout template  (Letto 2326 volte)

Offline paperjoomla

  • Appassionato
  • ***
  • Post: 258
  • Sesso: Maschio
    • Mostra profilo
centrare layout template
« il: 26 Feb 2007, 12:24:26 »
ciao ragazzi ho scaricato un template solo che l'allineamento delle colonne è tutto verso sinistra:
agevolo la foto


io vorrei centrarlo...

posto anche il codice:
Codice: [Seleziona]
<?php
defined
'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso explode'='_ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'$iso[1] .'"?' .'>';
?>

<!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">
<head>
<?php
if ( $my->id ) {
initEditor();
}
?>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php mosShowHead(); ?>
<link rel="stylesheet" type="text/css" href="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/css/template_css.css" />
<style type="text/css">
<!--
body {
margin-left: 2px;
margin-top: 4px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
function addBookmark(title,url) {

  var msg_netscape = "NetScape message";
  var msg_opera    = "This function does not work with this version of Opera.  Please bookmark us manually.";
  var msg_other    = "Your browser does not support automatic bookmarks.  Please bookmark us manually.";
  var agt          = navigator.userAgent.toLowerCase();


  if (agt.indexOf("opera") != -1)
  {
    if (window.opera && window.print)
    {
      return true;
    } else
    {
      alert(msg_other);
    }
  }   
  else if (agt.indexOf("firefox") != -1) window.sidebar.addPanel(title,url,"");
  else if ((agt.indexOf("msie") != -1) && (parseInt(navigator.appVersion) >=4)) window.external.AddFavorite(url,title);
  else if (agt.indexOf("netscape") != -1) window.sidebar.addPanel(title,url,"")         
  else if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(title,url,"");
  else alert(msg_other);
 
}
</SCRIPT>
</head>
<body>

<table width="100%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25"><span class="pathway">
      &nbsp;
      <?php mosPathWay(); ?>
</span></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td  height="72" width="774" background="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/hosta1.jpg" class="title">&nbsp;<?php echo $mosConfig_sitename?></td>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="774" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="154" valign="top">
      <table width="154" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="16" bgcolor="#E4E4E4"><div align="center"><span class="createdate"><a href="index.php"><img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/home_noir.gif" border="0" align="absmiddle" alt="Home"/></a>&nbsp;&nbsp;<img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/dotvertical.gif" width="9" height="16" align="absmiddle" />&nbsp;&nbsp;<a href="#" onclick="javascript:window.print();"><img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/print_noir.gif" border="0" align="absbottom" alt="Print"/></a>&nbsp;&nbsp;<img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/dotvertical.gif" width="9" height="16" align="absmiddle" /></span>&nbsp;&nbsp;<span class="createdate"><a href="javascript:;" onClick="addBookmark('<?php echo $mainframe->getPageTitle(); ?>',top.location.href)"><img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/bookmark_noir.gif" border="0" align="absbottom" alt="Bookmark"/></a></span></div></td>
        </tr>
        <tr>
          <td height="22" valign="top" bgcolor="#E4E4E4"><div align="center">
            <table width="50%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><div align="center">
                  <?php mosLoadModules 'user4', -); ?>
                </div></td>
              </tr>
            </table>
          </div></td>
        </tr>
        <tr>
          <td background="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/hosta2.jpg" style="background-repeat:no-repeat"><img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/pixel.png" width="1" height="42" /></td>
        </tr>
  </table>   
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><?php mosLoadModules 'left' ); ?>
              <div align="center"></div></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="bottom"><div align="left">
              <?php mosLoadModules 'user1' ); ?>
          </div></td>
        </tr>
      </table>
      <table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="100%">
            <?php mosLoadModules 'inset' ); ?></td>
        </tr>
      </table>
    <td width="620" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5"><img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/pixel.png" width="1" height="5" /></td>
      </tr>
      <tr>
        <td background="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/dot.gif"><img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/pixel.png" width="1" height="3" /></td>
      </tr>  
  <?php if (mosCountModules"user3" )) { ?>
      <tr>
        <td>&nbsp;<?php mosLoadModules 'user3', -); ?></td>
      </tr>
  <?php ?>
    </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top"><table width="96%" border="0" align="center" cellpadding="4" cellspacing="0">
            <tr>
              <td valign="top" class="mainpage"><?php mosLoadModules 'top' ); ?></td>
            </tr>
          </table>
            <table width="96%" border="0" align="center" cellpadding="4" cellspacing="0">
              <tr>
                <td valign="top" class="mainpage"><?php mosMainBody(); ?>
                </td>
              </tr>
            </table>
            <table width="96%" border="0" align="center" cellpadding="4" cellspacing="0">
              <tr>
                <td valign="top" class="mainpage"><?php mosLoadModules 'bottom' ); ?></td>
              </tr>
          </table></td>
<?php if (mosCountModules"right" )) { ?>
          <td width="154" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td valign="top"><?php mosLoadModules 'right' ); ?>
                  <?php mosLoadModules 'user2' ); ?>
  </td>
            </tr>
<?php ?>
          </table>
  </td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td colspan="2" valign="top">  <div align="center">
      <?php mosLoadModules 'banner, -1' ); ?>
    </div>      </tr>
</table>
<table width="774" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td background="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/dot.gif"><img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/pixel.png" width="1" height="3" /></td>
  </tr>
  <tr>
    <td valign="middle"><table width="32%"  border="0" align="left" cellpadding="0" cellspacing="0">
      <tr>
        <td><div class="createdate" align="left">&nbsp;&nbsp;<img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/home_vert.gif" width="12" height="10" align="bottom" />&nbsp;<a href="index.php">Home</a> <img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/dotvertical.gif" width="9" height="16" align="absmiddle" />&nbsp;<img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/print_vert.gif" width="15" height="16" align="absbottom" /><a href="#" onclick="javascript:window.print();">Print</a> <img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/dotvertical.gif" width="9" height="16" align="absmiddle" />&nbsp;<font color="#006600">@</font> <a href="index.php?option=com_contact&Itemid=3">Contact</a> <img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/dotvertical.gif" width="9" height="16" align="absmiddle" /> <img src="<?php echo $mosConfig_live_site?>/templates/dwd_hostalavista/images/top_vert.gif" width="14" height="16" align="absbottom" /><a href="#">Top</a><br />
              <br />
        </div></td>
      </tr>
    </table></td>
  </tr>
</table>
<?php mosLoadModules'debug', -);?>
</body>
</html>
...è stato meglio lasciarci che non esserci mai incontrati...

Offline maria.p

  • Abituale
  • ****
  • Post: 1045
    • Mostra profilo
Re: centrare layout template
« Risposta #1 il: 26 Feb 2007, 12:43:52 »
prova ad inserire  <center>
dopo  <body> e prima dell'inizio della tabella


Offline paperjoomla

  • Appassionato
  • ***
  • Post: 258
  • Sesso: Maschio
    • Mostra profilo
Re: centrare layout template
« Risposta #2 il: 26 Feb 2007, 12:56:35 »
ciao maria,
grazie per l'informazione.
ho inserito come hai detto ma mi lascia l'header a sinistra
agevolo la foto:


come sposto anche la parte sopra?


GRAZIE 1000
...è stato meglio lasciarci che non esserci mai incontrati...

Offline piterdan

  • Appassionato
  • ***
  • Post: 238
  • Sesso: Maschio
    • Mostra profilo
Re: centrare layout template
« Risposta #3 il: 26 Feb 2007, 13:04:05 »
Inserisci <center> testata </center>
Oppure prova a spostare quello che hai già inserito prima della testata.

Offline maria.p

  • Abituale
  • ****
  • Post: 1045
    • Mostra profilo
Re: centrare layout template
« Risposta #4 il: 26 Feb 2007, 13:06:56 »
mi dici il nome del template


l'ho trovato da sola dimentico sempre che c'è il nome nel codice

dopo quel center che hai inserito inizia il codice della tabella, leva width=100%
« Ultima modifica: 26 Feb 2007, 13:13:53 da maria.p »

Offline paperjoomla

  • Appassionato
  • ***
  • Post: 258
  • Sesso: Maschio
    • Mostra profilo
Re: centrare layout template
« Risposta #5 il: 27 Feb 2007, 11:26:12 »

dopo quel center che hai inserito inizia il codice della tabella, leva width=100%

GRANDE!
...è stato meglio lasciarci che non esserci mai incontrati...

 



Web Design Bolzano Kreatif