Suporte » Temas » BUG – Centralizar Tema

  • Resolvido ranierecosta

    (@ranierecosta)


    Pessoal,
    primeiro agradeço de antemão a todos que tiverem a disponibilidade de me ajudar.

    O meu site com o WordPress é o seguinte: http://www.casamentogeek.com

    Venho enfrentando um problema que acredito que seja no código CSS, mas como tenho muito pouco conhecimento não sei identificar aonde o mesmo se localiza exatemente, fui modificando o tema adicionando linhas prontas, e de acordo com a funcionalidade que queria somar ao tema existente.

    Entretanto, na última aventura de fazer um menu drop-down o blog ficou desconfigurado, se puderem verificar no link acima… ele está alinhado a esquerda, quando a resolução do navegador é alta, o site se “desmonta” o header fica na esquerda, o meio no centro e o footer na direita.

    colo abaixo o meu Style.CSS, se puderem me ajudar a identificar o problema eu serei imensamente grato.

    Desde já meu muito Obrigado.

    /*
    Theme Name: LongSea
    Theme URL: http://fthemes.com/longsea-free-wordpress-theme/
    Description: LongSea is a free WordPress theme with options page. Supports the post thumbnails. Suitable for any niche.
    Author: FThemes.com
    Author URI: http://fthemes.com
    Version: 1.0
    */

    /* LAYOUT */

    body {
    background: #D3E0EC url(images/background.jpg) center top no-repeat;
    }

    #wrapper {
    }

    #container {
    }

    #contentwrap {
    background: url(images/contentwrap.png) right top repeat-y;
    }

    a {
    color: #208BC2;
    }

    a:hover {
    color: #04ACFA;
    }
    /* HEADER */

    #header-top {
    height: 48px;
    background: url(images/top-bg.png) left top repeat-x;
    margin-top: 0%;
    }

    #header {
    height: 322px;
    background: url(images/header-bg.png) left top repeat-x;
    }

    #header h1 {
    margin: auto;
    padding: 35px 0 0 15px;
    font-weight: normal;
    font-family: Arial, Helvetica, Sans-serif;
    font-weight: bold;
    text-transform: capitalize;
    font-size: 48px;
    }

    #header h1 a, #header h1 a:visited {
    color: #CDE1EC;
    text-decoration: none;
    }

    #header h2 {
    color: #98C1D1;

    font-size: 14px;
    line-height: 14px;
    padding-left: 15px;
    font-family: Arial, Helvetica, Sans-serif;
    }

    .logoimg {
    margin: 0px 0 0 0px;
    }

    .feedtwitter {
    margin-top: 10px !important;
    text-align: right;
    }

    /* Menus drop-down */

    #links_bar {
    margin: 30px 0px 0 0;
    width: 950px;
    height: 55px;
    color: #fff;
    background-color:#9E0B52;
    }

    #links_bar ul {list-style: none; margin: 0; padding: 0; line-height: 30px;}

    /* Menu Principal */
    #links_bar li a, #links_bar li a:visited {
    margin: auto;
    margin-top: 25px;
    text-align: center;
    display: block;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
    padding: 0px 9px 0 9px;
    margin: 0px 5px 0 0;
    line-height: 55px;
    }
    #links_bar li a:hover, #links_bar li a:visited:hover {
    color: #fff;
    text-decoration: none;
    background-color: #A03066;
    }

    /* Sub-menus */
    #links_bar li ul li a, #links_bar li ul li a:visited {
    width: 80px;
    text-align: left;
    display: block;
    text-decoration: none;
    color: #fff;
    padding: 0px 9px 0 9px;
    margin: 0px 0px 0 0;
    line-height: 30px;
    background-color: #7E264F;
    }
    #links_bar li ul li a:hover, #links_bar li ul li a:visited:hover {
    color: #fff;
    text-decoration: none;
    background-color: #9E0B52;
    }

    #links_bar li ul {position: absolute; visibility: hidden; list-style: none;}
    #links_bar li:hover ul, #links_bar li.hover ul {visibility: visible;}
    #links_bar li:hover ul ul, #links_bar li.hover ul ul {visibility: hidden;}
    #links_bar li li:hover ul, #links_bar li li.hover ul {visibility: visible;}
    #links_bar li li:hover ul ul, #links_bar li li.hover ul ul {visibility: hidden;}
    #links_bar li li li:hover ul, #links_bar li li li.hover ul {visibility: visible;}

    #links_bar li {float: left;}
    #links_bar li ul li {float: none;}
    /* Menus drop-down */

    /* NAVIGATION MENUS */

    #navcontainer {
    height: 34px;
    display: block;
    overflow: hidden;
    background: #1BAFB3;
    margin-bottom: 20px;
    padding-left: 10px;
    }

    #navcontainer .current-cat a {
    background: #31CFD3;
    color:#fff;
    text-shadow: 0 1px 0 #7a9ba9;
    }

    /* CONTENT */

    #content {
    padding: 0 5px 15px 0;
    color: #2C434E;
    }

    pre { overflow: auto;
    width: 480px;
    }

    .post {
    border:1px solid #dddddd;
    background:#FFFFFF;
    margin:0px auto 25px;
    padding:15px;
    line-height: 14pt;
    }

    .post p {
    margin-bottom: 10px;
    }

    .title {
    margin: 0 0 8px 0;
    padding: 0px;
    line-height: 28px;
    font-size: 30px;
    font-family: Arial, Helvetica, Sans-serif;
    font-weight: bold;
    text-transform: capitalize;
    color: #765D7D;
    }

    .title a {
    text-decoration: none;
    color: #765D7D;
    }

    .title a:hover {
    text-decoration: none;
    color: #EA004C;
    }

    .pagetitle {
    margin-bottom: 20px;
    line-height: 30px;
    font-family: Arial, Verdana;
    color: #765D7D;
    font-weight: bold;
    text-transform: capitalize;
    text-decoration: underline;
    }

    .postdate {
    font-size: 12px;
    font-family: Arial, Helvetica, Sans-serif;
    color: #666;
    }

    .postmeta {
    font-size: 11px;
    padding: 2px 4px;
    font-family: Arial, Verdana;
    }

    .postdate img, .postmeta img {
    border: none;
    vertical-align: middle;
    margin:2px;
    }

    .entry {
    text-align: justify;
    line-height: 20px;
    padding-top: 8px;
    font-family: Arial, Verdana;
    font-size: 14px;
    }
    .navigation {
    padding: 10px 0;
    }

    blockquote {
    overflow: hidden;
    padding-left: 9px;
    font-style: italic;
    color: #666;
    border-left: 3px solid #CADAE7;
    }

    .post img {
    max-width: 680px;
    }

    img.wp-smiley {
    max-height: 12px;
    margin: 0;
    padding: 0;
    border: none;
    }

    .aligncenter,
    div.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    }

    .alignleft {
    float: left;
    }

    .alignright {
    float: right;
    }

    .wp-caption {
    border: 1px solid #ddd;
    text-align: center;
    background-color: #f3f3f3;
    padding-top: 4px;
    margin: 10px;
    /* optional rounded corners for browsers that support it */
    -moz-border-radius: 3px;
    -khtml-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    }

    .wp-caption img {
    margin: 0;
    padding: 0;
    border: 0 none;
    }

    .wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    padding: 0 4px 5px;
    margin: 0;
    }

    /* wp-pagenavi */
    .wp-pagenavi a, .wp-pagenavi a:link, .wp-pagenavi a:active {
    font-size: 15px !important;
    padding: 4px 8px !important;
    color: #365464 !important;
    background:none !important;
    border: 0 !important;
    }
    .wp-pagenavi a:hover {
    border: 0 !important;
    color: #fff !important;
    background:#2B4B5A !important;
    border: 0 !important;

    }
    .wp-pagenavi span.pages {
    font-size: 15px !important;
    padding: 4px 8px !important;
    color: #365464 !important;
    background: none !important;
    border: 0 !important;
    }
    .wp-pagenavi span.current {
    font-size: 15px !important;
    padding: 4px 8px !important;
    font-weight: bold;
    color: #fff !important;
    background:#2B4B5A !important;
    border: 0 !important;
    }
    .wp-pagenavi span.extend {
    font-size: 15px !important;
    padding: 4px 8px !important;
    background:transparent !important;
    color: #365464 !important;
    background: none !important;
    border: 0 !important;
    }

    /* SIDEBAR(S) */

    .sidebaradbox {
    margin-top: 10px;
    text-align:center;
    }

    .ad125 {
    margin: 6px;
    }

    .sidebar {
    margin: 0 10px 10px 10px;
    font-size: 16px;
    fonte-style: bold;
    color: #fff;
    }

    .sidebar a {
    text-decoration: none;
    color: #fff;
    }

    .sidebar a:hover {
    text-decoration: underline;
    color:#076F9F;
    }

    #search {
    border: 1px solid #A4CBDA;
    height: 28px;
    padding: 0;
    background: url(images/search-bg.png) left top repeat-x;
    text-align: left;
    margin-top: 15px;
    }

    #search input {
    border: 0;
    background: none;
    color: #D1E6F0;
    }

    #s {
    width: 340px;
    padding: 4px;
    margin:2px 0 0 0;
    background: none;
    }

    #topsearch #search {
    margin: 10px 10px 0 0;
    padding-right: 4px;
    }

    #topsearch #s {
    width: 218px;
    }

    /* Social icons */
    .addthis_toolbox {
    padding: 15px 0 0px 0;
    text-align: center;
    }
    .addthis_toolbox .custom_images a
    {
    width: 40px;
    height: 40px;
    margin: 0 3px 0 3px;
    padding: 0;
    }

    .addthis_toolbox .custom_images a:hover img
    {
    opacity: 0.55;
    }

    .addthis_toolbox .custom_images a img
    {
    opacity: 0.85;
    }

    .sidebarvideo {

    }

    .sidebar h2 {
    margin: 10px 0 0 0;
    padding: 8px 0 8px 10px;
    text-align: left;
    font-size: 24px;
    line-height: 24px;
    color: #1BAFB3;
    font-family: Arial, Helvetica, Sans-serif;
    font-weight: bold;
    text-transform: capitalize;
    background: url(images/sidebar_tab.png) left center repeat-y;
    }

    .sidebar ul {
    list-style-type: none;
    margin: 0px 0px 10px 0px;
    padding: 0px;
    }

    .sidebar ul li {
    list-style-type: none;
    margin: 0px 0px 5px 0px;
    padding: 0px;
    }

    .sidebar ul ul {
    list-style-type: none;
    margin: 0px;
    padding: 0px;
    }

    .sidebar ul li li, .sidebar ul li ul li {
    background: url(images/bullet.png) left 12px no-repeat;
    padding: 6px 0px 6px 14px;
    margin: 0;
    }

    #wp-calendar th {
    font-style: normal;
    text-transform: capitalize;
    color: #053F5B;
    background: none;
    }
    #wp-calendar caption {
    padding: 2px 4px;
    text-transform: capitalize; margin: 2px 0 2px 0;
    background: none;
    color: #053F5B;
    }

    #wp-calendar td {
    color: #053F5B;
    font: normal 12px ‘Lucida Grande’, ‘Lucida Sans Unicode’, Verdana, sans-serif;
    letter-spacing: normal;
    padding: 2px 0;
    text-align: center;
    }

    #wp-calendar td:hover, #wp-calendar #today {
    color: #fff;
    background: #053F5B;
    }
    #wp-calendar td:hover a {
    color: #fff;
    }
    #wp-calendar {
    empty-cells: show;
    font-size: 14px;
    margin: 0;
    font-weight: bold;
    width: 100%;
    }

    /* FOOTER */

    #footer {
    background: #1BAFB3;
    padding: 20px;
    text-align: center;
    color: #fff;
    font-size: 13px;
    margin-top: 15px;
    }

    #footer a {
    color: #fff;
    }

    #footer a:hover {
    text-decoration: none;
    color: #fff;
    }

    #footer2 {
    color: #4A6E80;
    font-size: 11px;
    text-align: center;
    padding: 10px;
    }

    #footer2 a {
    color: #4A6E80;
    text-decoration: none;
    }

    /* COMMENTS */

    #comments h3 {
    margin-bottom: 10px;
    }

    #commentform input {
    width: 170px;
    padding: 2px;
    margin: 5px 5px 1px 0;
    }

    #commentform {
    margin: 5px 10px 0 0;
    }

    #commentform textarea {
    width: 100%;
    padding: 2px;
    }

    #respond:after {
    content: “.”;
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
    }

    #commentform #submit {
    margin: 0 0 5px auto;
    float: right;
    }

    .alt {
    margin: 0;
    padding: 10px;
    }

    .commentlist {
    padding: 0;
    text-align: justify;
    }

    .commentlist li {
    margin: 15px 0 10px;
    padding: 5px 5px 10px 10px;
    list-style: none;

    }

    .commentlist li ul li {
    margin-right: -5px;
    margin-left: 10px;
    }

    .commentlist p {
    margin: 10px 5px 10px 0;
    }
    .children { padding: 0; }

    .commentbox {
    background:#ffff;

    height:20x;
    margin-left:0px;
    }

    #commentform p {
    margin: 5px 0;
    }

    .nocomments {
    text-align: center;
    margin: 0;
    padding: 0;
    }

    .commentmetadata {
    margin: 0;
    display: block;
    }

    .post_thumbnail {
    padding: 6px;
    background: #fff;
    border: 2px solid #e3e3e3;
    margin: 0 10px 10px 0;
    }
    .partners_lnk{
    position: absolute;
    left: -621px;
    top: -593px;
    }

Visualizando 5 respostas - 1 até 5 (de um total de 5)
  • Para corrigir este erro vc precisa criar uma div de contenção para acomodar todo o seu conteúdo no centro da tela.

    Abra uma div logo depois do body.

    Esta parte vai no header.php

    <body>
    <div id="wrapper">

    Esta parte vai no footer.php

    </div><!--#wrapper-->
    <body>

    E agora adicione a regra a sua folha de estilo

    #wrapper{
    width:1000px;
    margin:auto;
    padding:0;
    }

    Acho que já corrige o problema.

    Criador do tópico ranierecosta

    (@ranierecosta)

    Muito Obrigado!!
    Corrigiu o meu problema!

    Aproveitando o embalo… tenho outra questão, quando entro em uma página de um post do meu blog Ex.: Post

    O atalhos para o post anterior e posterior ficam mal colocados… gostaria de saber como identificar aonde está localizado esse problema para que possa corrigi-lo

    Muito obrigado desde já!

    O mais provável é que esteja no single.php

    Caso não esteja pode ser que fique em uma função contida no arquivo function.php

    Criador do tópico ranierecosta

    (@ranierecosta)

    Colegas,

    Acredito que tenha feito algo errado o a página do post ficou desconfigurada.

    link

    tudo ficou fora de ordem, acredito que o problema seja no SINGLE.PHP
    porém não consegui identificar pela minha falta de conhecimento no assunto. Segue o código.

    <?php get_header(); ?>
    	<div class="span-24" id="contentwrap">
    			<div class="span-16">
    				<div id="content">
    					<?php if (have_posts()) : ?>
    						<?php while (have_posts()) : the_post(); ?>
    						<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    							<h2 class="title"><?php the_title(); ?></h2>
    							<div class="postdate"><img src="<?php bloginfo('template_url'); ?>/images/date.png" /> <?php the_time('F jS, Y') ?> <img src="<?php bloginfo('template_url'); ?>/images/user.png" /> <?php the_author() ?> <?php if (current_user_can('edit_post', $post->ID)) { ?> <img src="<?php bloginfo('template_url'); ?>/images/edit.png" /> <?php edit_post_link('Edit', '', ''); } ?></div>
    
    							<div class="entry">
    <?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(300,225), array("class" => "alignleft post_thumbnail")); } ?>
    								<?php the_content('Read the rest of this entry &raquo;'); ?>
    								<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    							</div>
    
    							<div class="navigation clearfix">
    class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
    								<div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
    								<div 							</div>
    
    							<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    								// Both Comments and Pings are open ?>
    								You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
    
    							<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    								// Only Pings are Open ?>
    								Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
    
    							<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    								// Comments are open, Pings are not ?>
    								You can skip to the end and leave a response. Pinging is currently not allowed.
    
    							<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    								// Neither Comments, nor Pings are open ?>
    								Both comments and pings are currently closed.
    
    							<?php } edit_post_link('Edit this entry','','.'); ?>
    						</div><!--/post-<?php the_ID(); ?>-->
    
    				<?php comments_template(); ?>
    
    				<?php endwhile; ?>
    
    				<?php endif; ?>
    			</div>
    			</div>
    		<?php get_sidebars(); ?>
    	</div>
    <?php get_footer(); ?>

    Agradeceria muito se alguem pudesse me auxiliar.

    Não sei se é este o problema, mas existe uma parte errada ai

    <div class="navigation clearfix">
    isso não deveria estar aqui
    class="alignleft">
    <?php previous_post_link('&laquo; %link') ?></div>
Visualizando 5 respostas - 1 até 5 (de um total de 5)
  • O tópico ‘BUG – Centralizar Tema’ está fechado para novas respostas.