Резиновая шапка

Тема в разделе "Создание шаблона", создана пользователем egor11223, 08.04.2011.

  1. Offline

    egor11223 Недавно здесь

    Регистрация:
    04.07.2010
    Сообщения:
    9
    Симпатии:
    0
    Пол:
    Мужской
    Всем здравствуйте!Как можно зделать на шаблоне joomla резиновую шапку?Я уже пробовал width ставить в % не помогло.Шаблон зделан на artisteer 3.За помощ буду очень благодарен!
    Вот код:
    Index.php
    Код (PHP):
    1. <?php
    2.  
    3.  
    4.  
    5. /**
    6.  
    7.  * Template for Joomla! CMS, created with Artisteer.
    8.  
    9.  * See readme.txt for more details on how to use the template.
    10.  
    11.  */
    12.  
    13.  
    14.  
    15. defined('_JEXEC') or die;
    16.  
    17.  
    18.  
    19. require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'functions.php';
    20.  
    21.  
    22.  
    23. // Create alias for $this object reference.
    24.  
    25. $document = & $this;
    26.  
    27.  
    28.  
    29. $templateUrl = $document->baseurl . '/templates/' . $document->template;
    30.  
    31. artxComponentWrapper($document);
    32.  
    33. ?>
    34.  
    35. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    36.  
    37. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $document->language; ?>" lang="<?php echo $document->language; ?>" >
    38.  
    39. <head>
    40.  
    41.  <jdoc:include type="head" />
    42.  
    43.  <link rel="stylesheet" href="<?php echo $document->baseurl; ?>/templates/system/css/system.css" type="text/css" />
    44.  
    45.  <link rel="stylesheet" href="<?php echo $document->baseurl; ?>/templates/system/css/general.css" type="text/css" />
    46.  
    47.  <link rel="stylesheet" type="text/css" href="<?php echo $templateUrl; ?>/css/template.css" media="screen" />
    48.  
    49.  <!--[if IE 6]><link rel="stylesheet" href="<?php echo $templateUrl; ?>/css/template.ie6.css" type="text/css" media="screen" /><![endif]-->
    50.  
    51.  <!--[if IE 7]><link rel="stylesheet" href="<?php echo $templateUrl; ?>/css/template.ie7.css" type="text/css" media="screen" /><![endif]-->
    52.  
    53.  <script type="text/javascript" src="<?php echo $templateUrl; ?>/jquery.js"></script>
    54.  
    55.  <script type="text/javascript">jQuery.noConflict();</script>
    56.  
    57.  <script type="text/javascript" src="<?php echo $templateUrl; ?>/script.js"></script>
    58.  
    59. </head>
    60.  
    61. <body>
    62.  
    63. <div id="art-page-background-glare">
    64.  
    65.     <div id="art-page-background-glare-image">
    66.  
    67. <div id="art-main">
    68.  
    69. <div class="art-sheet">
    70.  
    71.     <div class="art-sheet-tl"></div>
    72.  
    73.     <div class="art-sheet-tr"></div>
    74.  
    75.     <div class="art-sheet-bl"></div>
    76.  
    77.     <div class="art-sheet-br"></div>
    78.  
    79.     <div class="art-sheet-tc"></div>
    80.  
    81.     <div class="art-sheet-bc"></div>
    82.  
    83.     <div class="art-sheet-cl"></div>
    84.  
    85.     <div class="art-sheet-cr"></div>
    86.  
    87.     <div class="art-sheet-cc"></div>
    88.  
    89.     <div class="art-sheet-body">
    90.  
    91. <div class="art-header">
    92.  
    93.     <div class="art-header-center">
    94.  
    95.         <div class="art-header-jpeg"></div>
    96.  
    97.     </div>
    98.  
    99.  
    100.  
    101. </div>
    102.  
    103. <jdoc:include type="modules" name="user3" />
    104.  
    105. <jdoc:include type="modules" name="banner1" style="artstyle" artstyle="art-nostyle" />
    106.  
    107. <?php echo artxPositions($document, array('top1', 'top2', 'top3'), 'art-block'); ?>
    108.  
    109. <div class="art-content-layout">
    110.  
    111.     <div class="art-content-layout-row">
    112.  
    113. <?php if (artxCountModules($document, 'left')) : ?>
    114.  
    115. <div class="art-layout-cell art-sidebar1">
    116.  
    117. <?php echo artxModules($document, 'left', 'art-block'); ?>
    118.  
    119.  
    120.  
    121.   <div class="cleared"></div>
    122.  
    123. </div>
    124.  
    125. <?php endif; ?>
    126.  
    127. <?php $contentCellStyle = artxCountModules($document, 'left') ? 'content' : 'content-wide'; ?>
    128.  
    129. <div class="art-layout-cell art-<?php echo $contentCellStyle; ?>">
    130.  
    131.  
    132.  
    133. <?php
    134.  
    135.   echo artxModules($document, 'banner2', 'art-nostyle');
    136.  
    137.   if (artxCountModules($document, 'breadcrumb'))
    138.  
    139.     echo artxPost(artxModules($document, 'breadcrumb'));
    140.  
    141.   echo artxPositions($document, array('user1', 'user2'), 'art-article');
    142.  
    143.   echo artxModules($document, 'banner3', 'art-nostyle');
    144.  
    145. ?>
    146.  
    147. <?php if (artxHasMessages()) : ?><div class="art-post">
    148.  
    149.     <div class="art-post-cc"></div>
    150.  
    151.     <div class="art-post-body">
    152.  
    153. <div class="art-post-inner">
    154.  
    155. <div class="art-postcontent">
    156.  
    157.  
    158.  
    159. <jdoc:include type="message" />
    160.  
    161.  
    162.  
    163. </div>
    164.  
    165. <div class="cleared"></div>
    166.  
    167.  
    168.  
    169. </div>
    170.  
    171.  
    172.  
    173.         <div class="cleared"></div>
    174.  
    175.     </div>
    176.  
    177. </div>
    178.  
    179. <?php endif; ?>
    180.  
    181. <jdoc:include type="component" />
    182.  
    183. <?php echo artxModules($document, 'banner4', 'art-nostyle'); ?>
    184.  
    185. <?php echo artxPositions($document, array('user4', 'user5'), 'art-article'); ?>
    186.  
    187. <?php echo artxModules($document, 'banner5', 'art-nostyle'); ?>
    188.  
    189.  
    190.  
    191.   <div class="cleared"></div>
    192.  
    193. </div>
    194.  
    195.  
    196.  
    197.     </div>
    198.  
    199. </div>
    200.  
    201. <div class="cleared"></div>
    202.  
    203.  
    204.  
    205.  
    206.  
    207. <?php echo artxPositions($document, array('bottom1', 'bottom2', 'bottom3'), 'art-block'); ?>
    208.  
    209. <jdoc:include type="modules" name="banner6" style="artstyle" artstyle="art-nostyle" />
    210.  
    211. <div class="art-footer">
    212.  
    213.     <div class="art-footer-t"></div>
    214.  
    215.     <div class="art-footer-l"></div>
    216.  
    217.     <div class="art-footer-b"></div>
    218.  
    219.     <div class="art-footer-r"></div>
    220.  
    221.     <div class="art-footer-body">
    222.  
    223.          <?php echo artxModules($document, 'syndicate'); ?>
    224.  
    225.         <div class="art-footer-text">
    226.  
    227.   <?php if (artxCountModules($document, 'copyright') == 0): ?>
    228.  
    229.     <?php ob_start(); ?>
    230.  
    231. <p>filterok.net</p><p>Copyright В© %YEAR%. All Rights Reserved</p>
    232.  
    233.  
    234.  
    235.     <?php echo str_replace('%YEAR%', date('Y'), ob_get_clean()); ?>
    236.  
    237.   <?php else: ?>
    238.  
    239.   <?php echo artxModules($document, 'copyright', 'art-nostyle'); ?>
    240.  
    241.   <?php endif; ?>
    242.  
    243.         </div>
    244.  
    245.         <div class="cleared"></div>
    246.  
    247.     </div>
    248.  
    249. </div>
    250.  
    251.         <div class="cleared"></div>
    252.  
    253.     </div>
    254.  
    255. </div>
    256.  
    257. <div class="cleared"></div>
    258.  
    259.  
    260.  
    261.  
    262.  
    263. </div>
    264.  
    265.     </div>
    266.  
    267. </div>
    268.  
    269.  
    270.  
    271.  
    272.  
    273.  
    274.  
    275.  
    276.  
    277.  
    278.  
    279. </body>
    280.  
    281. </html>

    CSS
    template.css
     
  2.  
  3. umbabaraumba
    Offline

    umbabaraumba Активист => Cпециалист <=

    Регистрация:
    25.09.2009
    Сообщения:
    623
    Симпатии:
    58
    Пол:
    Мужской
    Очень кода много . Лучше будет если ссылку на сайт дадите .
     
  4. Offline

    egor11223 Недавно здесь

    Регистрация:
    04.07.2010
    Сообщения:
    9
    Симпатии:
    0
    Пол:
    Мужской
  5. umbabaraumba
    Offline

    umbabaraumba Активист => Cпециалист <=

    Регистрация:
    25.09.2009
    Сообщения:
    623
    Симпатии:
    58
    Пол:
    Мужской
    У вас картинка фоном прописана в css , а надо ее в коде прописывать и задавать ей 100% ширину .
     
  6. Sam-vdv
    Offline

    Sam-vdv Недавно здесь

    Регистрация:
    08.09.2010
    Сообщения:
    145
    Симпатии:
    8
    Пол:
    Мужской
    background-image: url("http://filterok.net/templates/water/images/header.jpg"); эта картинка весит очень много и не нужно ее растягивать на всю!
    нужно просто залить бэкграунд цветом #2A4272

    egor11223, пропиши вот это в css
    Код (html):
    1. background: url('../images/header.jpg') #2A4272;
     
    Последнее редактирование: 11.04.2011
  7. Offline

    egor11223 Недавно здесь

    Регистрация:
    04.07.2010
    Сообщения:
    9
    Симпатии:
    0
    Пол:
    Мужской
    А по подробнее не роскажите как написать в коде?
     

Поделиться этой страницей

Загрузка...