Hallo Leute,
ich habe mir ein kleines Widget gebastelt, das bei mir in der Haupt-Sidebar die Kategorien und Tags eines Beitrags als Liste (nebeneinander) anzeigt. Habe soweit alles angepasst, aber bekomme den Inhalt einfach nicht zentriert dargestellt.
Hier der Content:
PHP
<ul class="gw-tags"><?php the_category(); ?></ul>
<?php $tag_list = get_the_tag_list('<ul class="gw-tags"><li>','</li><li>','</li></ul>');
if(!empty($tag_list)){ ?>
<div class="gw-tags">
<?php echo $tag_list; ?>
</div>
<?php }
?>
<div class="gw-tags-clear"></div>
Hier mein CSS:
Code
.gw-tags {
text-transform: uppercase;
font-family: 'BenchNine', sans-serif;
font-size: 14px;
font-weight: bold;
letter-spacing: 0.1em;
}
.gw-tags ul li {
margin-bottom: 5px;
display: inline-block;
cursor: pointer;
}
.gw-tags li {
margin-right: 6px;
background: #eee;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
-webkit-transition: all 0.1s ease-out;
-moz-transition: all 0.1s ease-out;
-ms-transition: all 0.1s ease-out;
-o-transition: all 0.1s ease-out;
transition: all 0.1s ease-out;
float: left;
}
.gw-tags li:hover {
background: #686868;
}
.gw-tags li a {
padding: 0px 5px 0 5px;
}
.gw-tags li a:hover {
color: #fff;
}
.gw-tags-clear {
clear: both;
margin: 0 0 26px 0;
}
Alles anzeigen
Hat dazu jemand eine Idee, wie ich das ganze in die Mitte bekomme?
