Добрый... Такой вопрос. Шаблон ja_purity В шапке две картинки. Хочется сделать 3 картинки и чтоб 2ая (по середине которая) была резиновой. Код (CODE): <?php /*------------------------------------------------------------------------ # JA Cooper Business for Joomla 1.5 - Version 1.0 - Licence Owner JA148390 # ------------------------------------------------------------------------ # Copyright (C) 2004-2008 J.O.O.M Solutions Co., Ltd. All Rights Reserved. # @license - Copyrighted Commercial Software # Author: J.O.O.M Solutions Co., Ltd # Websites: http://www.joomlart.com - http://www.joomlancers.com # This file may not be redistributed in whole or significant part. -------------------------------------------------------------------------*/ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); include_once (dirname(__FILE__).DS.'ja_vars_1.5.php'); ?> <!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" /> <?php JHTML::_('behavior.mootools'); ?> <link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/system.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/general.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/template.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/typo.css" type="text/css" /> <script language="javascript" type="text/javascript"> var siteurl = '<?php echo $tmpTools->baseurl();?>'; var tmplurl = '<?php echo $tmpTools->templateurl();?>'; </script> <script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/ja.script.js"></script> <!-- js for dragdrop --> <!-- Menu head --> <?php if ($jamenu) $jamenu->genMenuHead(); ?> <link href="<?php echo $tmpTools->templateurl(); ?>/css/colors/<?php echo strtolower ($tmpTools->getParam(JA_TOOL_COLOR)); ?>.css" rel="stylesheet" type="text/css" /> <!--[if lte IE 6]> <style type="text/css"> .clearfix {height: 1%;} img {border: none;} </style> <![endif]--> <!--[if gte IE 7.0]> <style type="text/css"> .clearfix {display: inline-block;} </style> <![endif]--> <?php if ($tmpTools->isIE()) { ?> <link href="<?php echo $tmpTools->templateurl(); ?>/css/ie.php" rel="stylesheet" type="text/css" /> <link href="<?php echo $tmpTools->templateurl(); ?>/css/colors/<?php echo strtolower ($tmpTools->getParam(JA_TOOL_COLOR)); ?>-ie.php" rel="stylesheet" type="text/css" /> <!--[if lte IE 6]> <link href="<?php echo $tmpTools->templateurl(); ?>/css/ie6.php" rel="stylesheet" type="text/css" /> <link href="<?php echo $tmpTools->templateurl(); ?>/css/colors/<?php echo strtolower ($tmpTools->getParam(JA_TOOL_COLOR)); ?>-ie6.php" rel="stylesheet" type="text/css" /> <script type="text/javascript"> window.addEvent ('load', makeTransBG); function makeTransBG() { makeTransBg($$('img')); } </script> <![endif]--> <?php } ?> <?php if ($tmpTools->isSafari()) { ?> <link href="<?php echo $tmpTools->templateurl(); ?>/css/safari.css" rel="stylesheet" type="text/css" /> <?php } ?> <?php if ($tmpTools->isOP()) { ?> <link href="<?php echo $tmpTools->templateurl(); ?>/css/op.css" rel="stylesheet" type="text/css" /> <?php } ?> <!--[if gt IE 7]> <link href="<?php echo $tmpTools->templateurl(); ?>/css/colors/<?php echo strtolower ($tmpTools->getParam(JA_TOOL_COLOR)); ?>-ie6.php" rel="stylesheet" type="text/css" /> <![endif]--> </head> <body id="bd" class="<?php echo $tmpTools->getParam(JA_TOOL_LAYOUT);?> <?php echo $tmpTools->getParam(JA_TOOL_SCREEN);?> fs<?php echo $tmpTools->getParam(JA_TOOL_FONT);?>" > <a name="Top" id="Top"></a> <!-- BEGIN: HEADER --> <div id="ja-headerwrap"><div id="ja-headerwrap2"> <div id="ja-header"> <div id="ja-header-innerpad" class="clearfix"> <!-- BEGIN: PATHWAY --> <div id="ja-pathway"> <jdoc:include type="module" name="breadcrumbs" /> </div> <!-- END: PATHWAY --> <?php $siteName = $tmpTools->sitename(); if ($tmpTools->getParam('logoType')=='image') { ?> <h1 class="logo"> <a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a> </h1> <?php } else { $logoText = (trim($tmpTools->getParam('logoText'))=='') ? $config->sitename : $tmpTools->getParam('logoText'); $sloganText = (trim($tmpTools->getParam('sloganText'))=='') ? JText::_('SITE SLOGAN') : $tmpTools->getParam('sloganText'); ?> <div class="logo-text"> <p class="site-slogan"><?php echo $sloganText;?></p> <h1> <a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $logoText; ?></span></a> </h1> </div> <?php } ?> <!-- BEGIN: HEADER TOOLS --> <div id="ja-headtools" class="ja-headtool"> <div class="ja-day"> <?php echo "<span>".date ('l')."</span>"; echo " <div>".date ('M')." ".date ('d').date ('S')."</div>"; ?> </div> <ul> <jdoc:include type="modules" name="ja-login" /> <!--module search--> <?php if($this->countModules('user4')) : ?> <jdoc:include type="modules" name="user4" /> <?php endif; ?> </ul> <?php if ($tmpTools->getParam(JA_TOOL_USER)) { ?> <div id="ja-usertools"> <strong>Text size</strong><?php $tmpTools->genToolMenu($tmpTools->getParam(JA_TOOL_USER)); ?> </div> <?php } ?> </div> <!-- END: HEADER TOOLS --> </div></div> </div> <!-- END: HEADER --> <!-- BEGIN: MAIN NAVIGATION --> <?php if ($tmpTools->getParam('ja_menu') != 'none') : ?> <div id="ja-mainnavwrap"> <div id="ja-mainnav" class="clearfix"> <?php if ($jamenu) $jamenu->genMenu (0); ?> </div> <ul style="display:none;"> <li><a href="<?php echo $tmpTools->getCurrentURL();?>#ja-content" title="<?php echo JText::_("Skip to content");?>"><?php echo JText::_("Skip to content");?></a></li> </ul> </div> <?php endif; ?> <!-- END: MAIN NAVIGATION --> <?php if ( $this->countModules('ja-slideshow') ) { ?> <!-- BEGIN: TOP SPOTLIGHT --> <div id="ja-topslwrap" class="clearfix"> <div id="ja-topsl" class="clearfix"><div id="ja-topsl-innerpad"> <jdoc:include type="modules" name="ja-slideshow" style="raw" /> </div> </div> </div> <!-- END: TOP SPOTLIGHT --> <?php } ?> <?php if ( $this->countModules('content-slide') ) { ?> <div id="ja-cs-wrap" class="clearfix"> <div id="ja-cs"><div class="ja-innerpad clearfix"> <jdoc:include type="modules" name="content-slide" style="raw" /> </div></div></div> <?php } ?> <div id="ja-containerwrap<?php echo $divid; ?>" class="clearfix"> <div id="ja-container"><div id="ja-container-innerpad" class="clearfix"> <!-- BEGIN: CONTENT --> <div id="ja-contentwrap" class="clearfix"> <div id="ja-content"> <jdoc:include type="message" /> <div id="ja-current-content" class="clearfix"><div id="ja-wrap1"> <jdoc:include type="component" /> </div></div> <!-- BEGIN: JAZIN --> <div id="jazin-fp"> <jdoc:include type="modules" name="ja-news" style="raw" /> </div> <!-- END: JAZIN --> <?php if($this->countModules('user6')) : ?> <!-- BEGIN: BANNER --> <div id="ja-tabwrap"> <jdoc:include type="modules" name="user6" style="raw" /> </div> <!-- END: BANNER --> <?php endif; ?> <?php if($this->countModules('banner')) : ?> <!-- BEGIN: BANNER --> <div id="ja-banner"> <jdoc:include type="modules" name="banner" /> </div> <!-- END: BANNER --> <?php endif; ?> </div> </div> <!-- END: CONTENT --> <?php if ($ja_left || $ja_right || $ja_masscol) { ?> <div id="ja-colwrap"> <?php if ($ja_masscol) { ?> <!-- BEGIN: MASSCOL --> <div id="ja-colmass" class="clearfix"> <div class="ja-innerpad"> <jdoc:include type="modules" name="user5" style="jamodule" /> </div> </div> <?php } ?> <?php if ($ja_left) { ?> <!-- BEGIN: LEFT COLUMN --> <div id="ja-col1"> <div class="ja-innerpad"> <?php if ($hasSubnav) : ?> <div id="ja-subnav" class="moduletable_menu"> <h3>On this page</h3> <div class="ja-boxct-wrap"><div class="ja-boxct"> <?php if ($jamenu) $jamenu->genMenu (1,1); ?> </div></div> </div> <?php endif; ?> <jdoc:include type="modules" name="left" style="jamodule" /> </div> </div> <!-- END: LEFT COLUMN --> <?php } ?> <?php if ($ja_right) { ?> <!-- BEGIN: RIGHT COLUMN --> <div id="ja-col2"> <div class="ja-innerpad"> <jdoc:include type="modules" name="right" style="jamodule" /> </div></div><br /> <!-- END: RIGHT COLUMN --> <?php } ?> </div> <?php } ?> </div></div></div> <?php $spotlight1 = array ('user7','user8','user9'); $botsl1 = $tmpTools->calSpotlight ($spotlight1,$tmpTools->isOP()?100:99.9); if( $botsl1 ) { ?> <!-- BEGIN: BOTTOM SPOTLIGHT 1 --> <div id="ja-botslwrap1"> <div id="ja-botsl1" class="clearfix"> <?php if( $this->countModules('user7') ) {?> <div class="ja-box<?php echo $botsl1['user7']['class']; ?>" style="width: <?php echo $botsl1['user7']['width']; ?>;"> <jdoc:include type="modules" name="user7" style="jamodule" /> </div> <?php } ?> <?php if( $this->countModules('user8') ) {?> <div class="ja-box<?php echo $botsl1['user8']['class']; ?>" style="width: <?php echo $botsl1['user8']['width']; ?>;"> <jdoc:include type="modules" name="user8" style="jamodule" /> </div> <?php } ?> <?php if( $this->countModules('user9') ) {?> <div class="ja-box<?php echo $botsl1['user9']['class']; ?>" style="width: <?php echo $botsl1['user9']['width']; ?>;"> <jdoc:include type="modules" name="user9" style="jamodule" /> </div> <?php } ?> </div></div> <!-- END: BOTTOM SPOTLIGHT 1 --> <?php } ?> <?php $spotlight2 = array ('user1','user2','user10'); $botsl2 = $tmpTools->calSpotlight ($spotlight2,$tmpTools->isOP()?100:99.9); if( $botsl2 ) { ?> <!-- BEGIN: BOTTOM SPOTLIGHT 2 --> <div id="ja-botslwrap2"> <div id="ja-botsl2" class="clearfix"> <?php if( $this->countModules('user1') ) {?> <div class="ja-box<?php echo $botsl2['user1']['class']; ?>" style="width: <?php echo $botsl2['user1']['width']; ?>;"> <jdoc:include type="modules" name="user1" style="xhtml" /> </div> <?php } ?> <?php if( $this->countModules('user2') ) {?> <div class="ja-box<?php echo $botsl2['user2']['class']; ?>" style="width: <?php echo $botsl2['user2']['width']; ?>;"> <jdoc:include type="modules" name="user2" style="xhtml" /> </div> <?php } ?> <?php if( $this->countModules('user10') ) {?> <div class="ja-box<?php echo $botsl2['user10']['class']; ?>" style="width: <?php echo $botsl2['user10']['width']; ?>;"> <jdoc:include type="modules" name="user10" style="xhtml" /> </div> <?php } ?> </div></div> <!-- END: BOTTOM SPOTLIGHT 2 --> <?php } ?> <!-- BEGIN: FOOTER --> <div id="ja-footerwrap"> <div id="ja-footer" class="clearfix"> <jdoc:include type="modules" name="user3" /> <jdoc:include type="modules" name="footer" /> </div></div> <!-- END: FOOTER --> <jdoc:include type="modules" name="debug" /> <script type="text/javascript"> ja_topsl_button(); addSpanToTitle3(); </script> </body> </html> т.е. я добавил <div id="ja-headerwrap2">, все 3 картинки выстроились в ряд, но насколько я понимаю, они все 3 стали резиновыми и похоже что поделились на 3 равных части. Из-за этого там где первая картинка, там где она заканчивается идет пустое место, далее 2-ая картинка тоже самое и 3-ая. Как сделать, чтоб у 1 ой и 3ей картинки, были обсолютная ширина, а у 2-ой процентная? Спасибо!
По коду не совсем понял где и как прописаны картинки, чтоб картинка тянулась пропишите ей width="100%"
картинки прописаны в teamplate.css. Ширина прописана Код (CODE): /* HEADER --------------------------------------------------------- */ #ja-headerwrap { background: url(../../images/grey/1lh.gif) no-repeat left top; } #ja-headerwrap2{ background: url(../../images/grey/1rh.gif) no-repeat right bottom; } #ja-header { position: relative; z-index: 999; } #ja-header-innerpad { background: url(../images/2rezc.gif) repeat-x center top; height: 120px; width: 100%; padding: 0 0px; line-height: normal; }
Среднюю картинку пропишите прямо в коде а не через css, типа того <img src="1rh.gif" width="100%" height="100px">