Can one create a If Else-statement that finishes a div before doing "else"? I wish to cycle through my posts and set the posts from "specialCat" in a single div.

<div id="the-div-i-want-to-close">  

<?php if (in_category('specialCat')) { ?> 

    <h1><?php the_title(); ?></h1>

<?php }  else { ?>

    <h1><?php the_title(); ?></h1>

<?php } ?>

Thanks :)

Your best choice would be to customize the query calling your personal category then finishing the loop using the relaxation from the posts.

 <?php
    $args = array(
    'category_name' => 'special-cat', // Use Category slug
    'posts_per_page' => -1 // Get all the post in SpecialCat
    );
    $special_query = new WP_Query( $args );
    ?>
    <div id="the-div-i-want-to-close"> 
    <?php
    while ( $special_query->have_posts() ) : $special_query->the_post();
    $no_repeat[] = $post->ID ?>
    <h1><?php the_title(); ?></h1>
    <?php endwhile; ?>
    </div> <?php // Close your special div after looping through all SpecialCat posts

// Start the loop again 

    if (have_posts() ) : while (have_posts() ) : the_post();
    if (in_array( $post->ID, $no_repeat ) ) continue;  // Exclude the posts we already got above ?>
    <h1><?php the_title(); ?></h1>
    <?php endwhile; endif; ?>

You can HTML inside a for every loop, as long as you close up the PHP tags (or range from the HTML within an echo statement).

Would this get it done for you personally?

<div id="the-div-i-want-to-close">  
<?php $isOpen = true; ?>
<?php if (in_category('specialCat')) { ?> 
    <?php the_title(); ?>
<?php }  else { ?>
    <?php if($isOpen) { ?>
    </div>
    <?php $isOpen = false; ?>
    <?php } ?>
    <?php the_title(); ?>
<?php } ?>