Merhabalar arkdaşlar
Bir wordpress teması hazırlamaktayım fakat bir yerde sıkıntım var sorun şu:;
Yorumsuz sayfada sidebar sağlam fakat yorum yazılınca biraz aşırı sağa kayıyor yaklaşık 3 saat uğraşmama rağmen sorunu halledemedim.
Css Comment Kodları ;
/* Comment Etc
********************* */
.navigation a
{
color: #666;
}
.navigation a:hover {
color: #333;
text-decoration: underline;
}
.alignleft{
float: left;
width: 50%;
}
.alignright{
float: right;
text-align: right;
width: 50%;
}
.ileft {
float: left;
margin-right: 5px;
}
p.stats {
color: #999;
font-size: .8em;
border: 1px solid #ccc;
border-left: none;
border-right: none;
}
blockquote
{
background: url(images/blockquote.gif) no-repeat left top;
margin: 1em;
padding: 0 0 10px 50px;
}
#content .commentsfeedr
{
background: url(images/feed.png) no-repeat left center;
padding-left: 20px;
}
#content .trackbackr
{
background: url(images/arrow_refresh.png) no-repeat left center;
padding-left: 20px;
}
input.textbox, textarea{
background: #fff url(images/shadow_top.gif) repeat-x top;
border: #ccc 10px solid;
font: 1em Verdana, Arial, Serif;
padding: 2px;
}
input.textbox:focus, textarea:focus{
background: #fff url(images/shadow_top.gif) repeat-x top;
border: #999 2px solid;
}
#submit{
padding: 3px 5px;
}
.comment
{
background: #fff url(images/shadow_top.gif) repeat-x top;
border-bottom: #ddd 1px solid;
list-style: none;
margin: 0;
padding: 1em 0.5em;
}
.alt{
background: #f9f9f9;
}
.MyAvatars{
border: 1px solid #ccc;
border-bottom: 1px solid #999;
border-right: 1px solid #999;
float: right;
margin-left: 5px;
margin-right: 10px;
padding: 3px;
}
#comment {
width: 96%;
}
fieldset {
border: none;
}
textarea#cp_message {
width: 100%;
}
.search {
margin-bottom: 10px;
}
.search #s {
border: 2px solid #ccc;
background: #efefef;
padding: 5px;
}
.search #s:focus {
border: 2px solid #ddd;
background: #fff;
padding: 5px;
}
.search #searchsubmit {
background:#87A62E;
padding: 5px;
border: 2px solid #226700;
font-weight: bold;
border-top: 2px solid #4BE400;
border-left: 2px solid #4BE400;
color: #fff;
}
pre {
width: 95%;
overflow:auto;
font: 13px 'Courier New', Courier, Verdana, Arial, sans-serif;
color: #666;
max-height: 350px;
line-height: 18px;
margin: 10px 0;
border: 1px solid #999;
padding: 5px;
background: #efefef;
}
code {
font: 13px 'Courier New', Segoe Print, Arial, Helvetica, sans-serif;
color: #666;
padding: 2px;
}
ol.commentlist {
margin:0;
padding:0;
}
.commentlist li {
list-style:none;
margin-bottom:14px;
}
.commentlist cite {
padding: 11px;
display: block;
font-style:normal;
background:url(images/bg_comments2_cite.gif);
border-top: 2px solid #fff;
color:#596e3b;
}
.commentlist a:link, .commentlist a:visited {
color:#596e3b;
}
.commentlist a:hover, .commentlist a:active {
color:#8ec343;
}
.commentlist cite img {
padding:1px;
border:1px solid #aab59a;
float:left;
margin-right:9px;
}
.commentlist .author {
font: small-caps bold 1.2em Georgia, "Times New Roman", Times, serif;
text-decoration:underline;
}
.commentlist .time {
background: url(images/yorum-saat.gif) no-repeat 1px;
padding-left:13px;
}
.commenttext {
border: 5px solid #ddd;
color: #666;
padding: 10px;
margin-bottom: 10px;
background:#fff repeat-x bottom;
}
Comment.php de ki kodlar:
<?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
?>
<p>This post is password protected. Enter the password to view comments. </p>
<?php
return;}
}
/* This variable is for alternating comment background */
$oddcomment = 'alt';
?>
<!-- You can start editing here. -->
<?php
$ix=0;
?>
<div class="post">
<?php if ($comments) : ?>
<?php comments_number('Yorumsuz', '1 Yorum', '% Yorum' );?> Yapılmış ||
<?php if ($post->ping_status == "open") { ?>
<span class="trackbackr"><a href="<?php trackback_url(display); ?>">Trackback <acronym title="Uniform Resource Identifier">URI</acronym></a></span> |
<?php } ?>
<?php if ($post-> comment_status == "open") {?>
<span class="commentsfeedr">
<?php comments_rss_link('Yorumlar RSS'); ?>
</span>
<?php }; ?>
</div>
<ol class="commentlist">
<?php foreach ($comments as $comment) : ?>
<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
<cite>
<?php if(function_exists('get_avatar')) { echo get_avatar($comment, '40'); } ?>
<span class="author"><?php comment_author_link() ?></span><br /><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('d F Y l') ?></a><span class="time"><?php comment_time() ?></span> <?php edit_comment_link('düzenle',' ',''); ?>
</cite>
<div class="commenttext"><?php comment_text() ?></div>
<?php if ($comment->comment_approved == '0') : ?>
<em>Yorumunuz onay bekliyor.</em>
<?php endif; ?>
</li>
<?php
/* Changes every other comment to a different class */
$oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
?>
<?php endforeach; /* end for each comment */ ?>
</ol>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<p class="nocomments">Yorumlar kapalı.</p>
<?php endif; ?>
<?php endif; ?>
<?php if ('open' == $post->comment_status) : ?>
<h3 class="post" id="respond">Yorum Yap
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p>
<?php else : ?>
<p>
<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<label for="author"><small>İsim/Soyisim
<?php if ($req) echo "(gerekli)"; ?>
</small></label>
</p>
<p>
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
<label for="email"><small>E-Posta (yayınlanmayacak)
<?php if ($req) echo "(gerekli)"; ?>
</small></label>
</p>
<p>
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small>Site</small></label>
</p>
<?php endif; ?>
<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>
<p>
<textarea name="comment" id="comment" cols="100%" rows="10" tabindex="5"></textarea>
</p>
<p>
<input name="submit" type="submit" id="submit" tabindex="5" value="Gönder" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p></h3>
<?php do_action('comment_form', $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>
Sonuç olarak sidebar sağa kayıyor ve sidebarda ki yazılarda ortalanıyor.
Şimdiden okuyup yardım edecek arkadaşlara teşekkür ederim.
Kolay Gelsin