WordPress.org

Support

Support » Themes and Templates » CSS Float: content AFTER the loop needs to float UP

CSS Float: content AFTER the loop needs to float UP

  • Hi,

    is there a way to float a div at the top right corner of a content area, but actually define the div at the end of the content?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Use relative positioning to move it away from its normal position in the page flow.

    Mind helping me out a bit?
    Here’s my code:

    <div id="container">
      <div id="navi">listpages</div>
      <div id="logo">logo</div>
    
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
      <div id="header">header image</div>
      <div id="content">
        <p><?php the_content('more »'); ?></p>
      </div>
    <?php endwhile; else: ?><p>Nothing found!</p><?php endif; ?>
      <div id="side">Subpage loop</div>
    <?php get_footer(); ?>
    </div> <!-- container -->

    The important CSS parts are

    #container {width:800px; margin:0px auto; padding:10px 0 0 0;}
    #navi{width:650px; height:63px; float:right;}
    #logo {width:150px; height:63px; float:left;}
    #header{width:800px; height:250px; float:left; overflow:hidden; margin: 25px 0 15px 0;}
    #content {width:100%;float:left;}
    #side {float:right; width:266px;}

    I just can’t get my head around it.

    What are you trying to move and where do you want it to appear?

    the “side” div.

    On the site
    http://zukunft-flughafen.at/menschen/
    you see two subpages listed. That’s a temporary solution using wp-list-pages.

    What I want is for the subpages to be listed like on this page
    http://zukunft-flughafen.at/
    That’s the “side” div that’s hugging the top right corner.

    Is that understandable?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CSS Float: content AFTER the loop needs to float UP’ is closed to new replies.