Прочитал много топиков по созданию шаблонов (в перемешку для версии 1 и 1.5). Пишу шаблон под joomla 1.5 + Virtuemart. Появились проблемы: 1. Правильно ли заполнена верхняя часть index.php до <body>? 2. Joomla не подхватывает template.css 6 строка. Подскажите что вписать вместо "MAV-1". Там должн быть по идее php запрос на название шаблона. 3. Что верно: <?php echo mosLoadModules('topcenter',0);?> или <jdoc:include type="modules" name="topcenter" /> при выводе модулей для joomla 1.5 ? 4. Сильно плывёт шаблон в explorer 6 в отличии от moziilli? Заметите ещё ошибки: напишите пожалуйста. Код (PHP): <?php echo '<?xml version="1.0" encoding="utf-8"?' .'>'; ?> <!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" xml:lang="{LANG_TAG}" lang="{LANG_TAG}" dir="{LANG_DIR}" > <head> <jdoc:include type="head" /> <link rel="stylesheet" href="templates/MAV-1/css/template.css" type="text/css" /> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#7DC2FD"> <tr align="center"><!--Строка_1--> <td height="180" class="top_l"><p>логотип</p></td> <td class="top_cl"><p align="left" valign="top">ISQ</p></td> <td width="10" class="top_c"> </td> <td width="250" class="top_cr"><?php echo mosLoadModules('topcenter',0);?></td> <td class="top_r" valign="top"><jdoc:include type="modules" name="topright" /></td> </tr><!--конец_Строки_1--> <tr align="center"><!--Строка_2--> <td colspan="5" class="topmenu"><?php echo mosLoadModules('topmenu',0);?></td> </tr><!--конец_Строки_2--> <tr align="center"><!--Строка_3--> <td width="195" class="left"><?php echo mosLoadModules('left',0);?> </td> <td colspan="3" class="main"><jdoc:include type="component" /> </td> <td width="195" class="right"><?php echo mosLoadModules('right',0);?></td> </tr><!--конец_Строки_2--> <tr align="center"><!--Нижняя_строка--> <td height="57" colspan="5" class="footer"><?php echo mosLoadModules('footer',0);?></td> </tr><!--конец_Нижней_строки--> </table> </body> </html> И CSS: Код (CODE): body { padding:0; border:0; margin:0; font-family:Verdana, Arial, Helvetica, sans-serif; color:#000; /*background: url(../images/bg.jpg) repeat-x top #494949;*/ font-size:12px; background-color: #7DC2FD; } a:link { color: #333; text-decoration: underline; } a:visited { color: #000; text-decoration: underline; } a:focus { color:#000; text-decoration:underline; } a:hover { color: #003A75; text-decoration:none; } a:active { color: #000; text-decoration:underline; } /* ВВЕРХ (header,top) */ /* top_l */ .top_l { height: 159px; background-position: top left; background-color: #494949; background-image: url(../images/header_c.jpg); background-repeat: repeat-x; } /* top_cl */ .top_cl { height: 159px; background-position: top center; background-color: #494949; background-image: url(../images/header_c.jpg); background-repeat: repeat-x; font-size:10px; } /* top_c */ .top_c { height: 159px; background-position: top center; background-color: #494949; background-image: url(../images/header_c.jpg); background-repeat: repeat-x; font-size:10px; } /* top_cr */ .top_cr { height: 159px; background-position: top center; background-color: #494949; background-image: url(../images/header_c.jpg); background-repeat: repeat-x; font-size:10px; } /* top_r */ .top_r { height: 159px; background-position: top right; background-color: #494949; background-image: url(../images/header_right.jpg); background-repeat: no-repeat; border-width:0; font-size:10px; padding-left: 0px; } .top_r .inputbox { text-align: center } /************************/ /* Меню */ .topmenu { background-color:#234988 } .topmenu { text-align: center; padding:0; margin:0 0 0 1px; height:20px; } .topmenu ul { padding:0; margin:0; list-style:none; } /* основной*/ .topmenu ul li { padding:0; margin:0; border-right:1px solid #fff; float:left; height:25px; } .topmenu ul li a { padding:0 19px; margin:0; line-height:20px; display:block; color:#fff; text-decoration:none; } .topmenu ul li a:hover { color:#000; background:url(../images/ver_1.jpg) repeat-x; } .topmenu #active_menu-nav { color:#000; background:url(../images/ver_1.jpg) repeat-x; } /************************/ /* Главное */ /************************/ /* Низ—(footer) */ .footer { height: 57px; background-position: center; background-repeat: repeat-x; background-color: #494949; background-image: url(../images/footer_c.jpg); } /************************/
1. правильный хеадер Код (html): <?php /* * @copyright Copyright (C) 2008 - 2009 All rights reserved. * @license */ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); ?> <!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" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" > <head> <jdoc:include type="head" /> <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/system/css/system.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/system/css/general.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template.css" type="text/css" /> <?php if($this->direction == 'rtl') : ?> <link href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template_rtl.css" rel="stylesheet" type="text/css" /> <?php endif; ?> </head> <body> 2. подключение CSS файла Код (html): <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template.css" type="text/css" /> 3. указание позиции модуля Код (html): <jdoc:include type="modules" name="user4" style="xhtml" />
woojin спасибо за оперативность. Подскажите пожалуйста как сделать: чтоб нижняя часть примыкала к низу экрана в случае если не достаточно материала размещено d"component", то есть чтоб таблица была растянута вниз по вертикали.
Ребята, не надо мучаться. Специально для таких как вы сделала универсальный шаблон с оптимизированным кодом. Шаблон с блочной версткой, таблицы уже давно на катят и не отвечают стандартам правят DIVы. Короче все описано, что как где менять и код уже готовый есть посмотрите, может в голове что-то проясниться http://likbez-net.ru/sozdanie-template.html
Судя по вашим сообщениям вы просто рекламируете сайт. Как выравнять центральную часть вверх? Как заставить её прилипнуть к верхней границе ячейки минус пару пикселей. Модуль объявлен в ячейке: Код (PHP): <td colspan="3" class="main_c"><jdoc:include type="component" /> </td> В CSS пробовал: Код (PHP): position:inherit; top:1px; Может чё нить подскажете.
нет такой позиции это указатель на то что значение унаследованно и завязывай с табличной вёрсткой переходи на тёмную сторону DIV'а
Как скажете Обиван. И нарекаю его "main": Код (CODE): <td colspan="3" class="main_c"><div id="main"><jdoc:include type="component" /></div></td> Как теперь заставить содержимое "main" выравнить вверх?
вообще от таблиц избавиться что не можешь? делай шаблон полностью весь на DIV'ав а не вставляй DIV во внутрь ячейки может не выровнять а прижать? читай: HTML таблицы и вообще возьми за правило в google.ru лазить прежде чем чего либо не понимать