Ich habe zwei CSS Float-Probleme auf dieser Website (http://melisayavas.com/web), die ich nicht herausfinden kann. Der erste ist direkt auf der Homepage. Ich habe zwei Javascript-Folien und einen großen leeren Raum unter ihnen. Warum?CSS Floats und Margen Probleme in WordPress
Das zweite Problem ist auf der News-Seite - http://melisayavas.com/web/?page_id=30 - wo die Sidebar einfach nicht dahin schwimmt, wo es sollte. Auch hier habe ich keine Ahnung, welches Element den Schwimmer stoppt.
Dies ist der HTML-Code in header.php:
<article class="post" id="post-<?php the_ID(); ?>">
<div class="homepage">
<div class="testimonials"><?php slidedeck(58, array('width' => '500px', 'height' => '550px')); ?>
</div>
<div class="images"><?php slidedeck(66, array('width' => '400px', 'height' => '550px')); ?>
</div>
</div>
</article>
Dies ist der entsprechende CSS:
article, aside, figure, footer, header, hgroup, nav, section {
display: block;
overflow: hidden;
clear: both;
}
.post {
border: 2px solid;
border-radius: 10px;
clear: both;
overflow: hidden;
padding: 20px;
margin-top: 28px;
}
.testimonials {position: relative;}
.images {position:relative;margin-left: 543px; top: -556px; width: 100%;}
Der HTML-Code für die News-Seite:
<div class="news-page">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="news">
<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
<?php include (TEMPLATEPATH . '/_/inc/meta.php'); ?>
<div class="entry">
<?php the_content(); ?>
</div>
</article>
</div>
<?php endwhile; ?>
<?php include (TEMPLATEPATH . '/_/inc/nav.php'); ?>
<?php else : ?>
<h2>Not Found</h2>
<?php endif; ?>
</div>
Und die CSS:
.news-page {
width: 100%;
}
.news {
float: left;
width: 60%;
}
#sidebar {float: right; width: 30%;}
Danke für die Erklärungen und die Hilfe! –
Danke, ich bin froh, dass ich helfen konnte :) – afaf12