Background de acordo com a resolução da tela[RESOLVIDO]
- lucascatani
-
Autor do Tópico
- Offline
- JCB! Professional
-
Menos
Mais
14 anos 6 meses atrás #46635
por lucascatani
Espero que ajude....
Lucas Catani
[b:1bmpfj72]Blog[/b:1bmpfj72]: <!-- m --><a class="postlink" href=" www.l9web.com.br/blog/ " onclick="window.open(this.href);return false;"> www.l9web.com.br/blog/ </a><!-- m -->
[b:1bmpfj72]MSN:[/b:1bmpfj72] <!-- e --><a href="Este endereço de email está sendo protegido de spambots. Você precisa do JavaScript ativado para vê-lo.">Este endereço de email está sendo protegido de spambots. Você precisa do JavaScript ativado para vê-lo.</a><!-- e -->
[b:1bmpfj72]L9WEB | WEBSITES[/b:1bmpfj72] <!-- m --><a...
lucascatani replied the topic: Re: Background de acordo com a resolução da tela[RESOLVIDO]
Amigo.. segue o código inteiro do index.php para você tirar suas dúviasaroldoschwab escreveu: Amigo... poderia ser mais específico onde você colocou esse código no index.php?
Quando coloco no index aqui aparecem erros de linguagem... por acaso não tem que ter:
<script language="JavaScript">
antes e depois fechando o código no index? ou algo assim?
Agradeço a resposta...
<script type="text/javascript">
function resolucao()
{
if (screen.width == "640"){
document.body.style.background="#fafafa url(http://localhost/xxxpolenta/templates/mariabenta/images/page_bg800.jpg) no-repeat";
}
if (screen.width == "800"){
document.body.style.background="#fafafa url(templates/mariabenta/images/page_bg800.jpg) no-repeat";
}
if (screen.width == "1152"){
document.body.style.background="#fafafa url(templates/mariabenta/images/page_bg1152.jpg) no-repeat";
}
if (screen.width == "1024"){
document.body.style.background="#fafafa url(templates/mariabenta/images/page_bg1024.jpg) no-repeat";
}
if (screen.width == "1280"){
document.body.style.background="#fafafa url(templates/mariabenta/images/page_bg1280.jpg) no-repeat";
}
if (screen.width == "1440"){
document.body.style.background="#fafafa url(templates/mariabenta/images/page_bg1440.jpg) no-repeat";
}
if (screen.width == "1366"){
document.body.style.background="#fafafa url(templates/mariabenta/images/page_bg1366.jpg) no-repeat";
}
if (screen.width == "1680"){
document.body.style.background="#fafafa url(templates/mariabenta/images/page_bg1680.jpg) no-repeat";
}
if (screen.width == "1600"){
document.body.style.background="#fafafa url(templates/mariabenta/images/page_bg1680.jpg) no-repeat";
}
}
</script>
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
JPlugin::loadLanguage( 'tpl_SG1' );
?>
<!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="templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<!--[if IE 8]>
<style type="text/css">
#wrapper {display:table;}
</style>
<![endif]-->
</head>
<body id="page_bg" onload = "resolucao()">
<div id="wrapper">
<div id="header">
<div id="pillmenu"><jdoc:include type="modules" name="user3" /></div>
<div id="search"><jdoc:include type="modules" name="user4" /></div>
<div class="clr"></div>
</div>
<?php if($this->countModules('left') and $this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
<div id="content">
<?php elseif($this->countModules('left') and !$this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
<div id="content_l">
<?php elseif(!$this->countModules('left') and $this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
<div id="content_r">
<?php else: ?>
<div id="content_full">
<?php endif; ?>
<?php if($this->countModules('left') and JRequest::getCmd('layout') != 'form') : ?>
<div id="leftcolumn">
<jdoc:include type="modules" name="left" style="rounded" />
<br />
<?php $sg = 'banner'; include "templates.php"; ?>
<br />
</div>
<?php endif; ?>
<?php if($this->countModules('left') and $this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
<div id="maincolumn">
<?php elseif($this->countModules('left') and !$this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
<div id="maincolumn_left">
<?php elseif(!$this->countModules('left') and $this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
<div id="maincolumn_right">
<?php else: ?>
<div id="maincolumn_full">
<?php endif; ?>
<div class="nopad">
<?php if($this->params->get('showComponent')) : ?>
<jdoc:include type="component" />
<?php endif; ?>
</div>
</div>
<?php if($this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
<div id="rightcolumn">
<jdoc:include type="modules" name="right" style="rounded" />
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
</div>
<div id="footer">
<jdoc:include type="modules" name="debug" />
</div>
</body>
</html>
Espero que ajude....
Lucas Catani
[b:1bmpfj72]Blog[/b:1bmpfj72]: <!-- m --><a class="postlink" href=" www.l9web.com.br/blog/ " onclick="window.open(this.href);return false;"> www.l9web.com.br/blog/ </a><!-- m -->
[b:1bmpfj72]MSN:[/b:1bmpfj72] <!-- e --><a href="Este endereço de email está sendo protegido de spambots. Você precisa do JavaScript ativado para vê-lo.">Este endereço de email está sendo protegido de spambots. Você precisa do JavaScript ativado para vê-lo.</a><!-- e -->
[b:1bmpfj72]L9WEB | WEBSITES[/b:1bmpfj72] <!-- m --><a...
Please Entrar ou Registrar to join the conversation.
- aroldoschwab
-
- Offline
- JCB! Novato
-
Menos
Mais
- Postagens: 2
- Obrigados Recebidos: 0
- lucascatani
-
Autor do Tópico
- Offline
- JCB! Professional
-
14 anos 6 meses atrás #46758
por lucascatani
Valeu! Grande abraço! <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt="
" title="Chorando ou Muito Triste" /><!-- s:cry: -->
Lucas Catani
[b:1bmpfj72]Blog[/b:1bmpfj72]: <!-- m --><a class="postlink" href=" www.l9web.com.br/blog/ " onclick="window.open(this.href);return false;"> www.l9web.com.br/blog/ </a><!-- m -->
[b:1bmpfj72]MSN:[/b:1bmpfj72] <!-- e --><a href="Este endereço de email está sendo protegido de spambots. Você precisa do JavaScript ativado para vê-lo.">Este endereço de email está sendo protegido de spambots. Você precisa do JavaScript ativado para vê-lo.</a><!-- e -->
[b:1bmpfj72]L9WEB | WEBSITES[/b:1bmpfj72] <!-- m --><a...
lucascatani replied the topic: Re: Background de acordo com a resolução da tela[RESOLVIDO]
aroldoschwab escreveu: Obrigado pela resposta amigo...
Deu certo aqui sim agora...
Valeu
E parabéns pelo código...
Valeu! Grande abraço! <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt="

Lucas Catani
[b:1bmpfj72]Blog[/b:1bmpfj72]: <!-- m --><a class="postlink" href=" www.l9web.com.br/blog/ " onclick="window.open(this.href);return false;"> www.l9web.com.br/blog/ </a><!-- m -->
[b:1bmpfj72]MSN:[/b:1bmpfj72] <!-- e --><a href="Este endereço de email está sendo protegido de spambots. Você precisa do JavaScript ativado para vê-lo.">Este endereço de email está sendo protegido de spambots. Você precisa do JavaScript ativado para vê-lo.</a><!-- e -->
[b:1bmpfj72]L9WEB | WEBSITES[/b:1bmpfj72] <!-- m --><a...
Please Entrar ou Registrar to join the conversation.