Jump to content

Div not appearing correctly


lostprophetpunk

Recommended Posts

Hello there,

 

I am in the final stages of coding my entire website. However, I have hit a snag on the front page. The footer appears to be halfway up the 'latest 3 blog entries', and I cannot seem to get it down.

 

I have tried 'clear:both;', and putting the code in different places, but nothing has worked. The relevant CSS and HTML code is below...

 

#blog {
        width: 855px;
        height: 200px;
        margin-top: 30px;
        margin-right: 15px;
        float: right;
        background: transparent url(../images/righticon.png) no-repeat top left;
}
#blog h1 {
        font-family: georgia;
        font-size: 1.6em;
        font-weight: normal;
        color: #25587E;
        margin-left: 60px;
        padding: 0px;
        margin-top: 6px;
}
#blog p {
        font-family: arial;
        font-size: 0.9em;
        line-height: 1.5em;
        color: #444444;
        margin-top: 5px;
}
#blog h4 {
        font-family: arial;
        font-size: 0.8em;
        color: #444444;
        padding: 0px;
        margin: 0px;
        margin-top: -10px;
        margin-bottom: 10px;
}
p.blogtitle a:link {
        margin: 0px;
        font-family: Georgia;
        font-size: 1.2em;
        text-decoration: none;
        color: #25587E;
}
p.blogtitle a:visited {
        margin: 0px;
        font-family: Georgia;
        font-size: 1.2em;
        text-decoration: none;
        color: #25587E;
}
p.blogtitle a:active {
        margin: 0px;
        font-family: Georgia;
        font-size: 1.2em;
        text-decoration: none;
        color: #25587E;
}
p.blogtitle a:hover {
        margin: 0px;
        padding: 0px;
        font-family: Georgia;
        font-size: 1.2em;
        text-decoration: underline;
        color: #25587E;
}
#blog span {
        font-family: arial;
        font-size: 0.8em;
        line-height: 1.5em;
        color: #444444;
        margin-top: 5px;
}

.blogroll {
        width: 285px;
        height: 200px;
        float: left;
}

#footer {
       width: 880px;
       height: 35px;
      padding-right:20px;
      text-align:right;
      margin:0;
       font-family: arial;
       font-size: 0.7em;
       color: #444444;
}

#footer a { color: #25587E; text-decoration: none; }
#footer a:visited { color: #25587E; text-decoration: none; }
#footer a:active { color: #25587E; text-decoration: none; }
#footer a:hover { color: #000000; text-decoration: none; }

 

    <div id="blog">
      <h1>From My Blog</h1>
    <div class="blogroll" style="width: 275px; padding-right: 10px;">
<?php //while (have_posts()): the_post(); ?>
<p class="blogtitle"><a href="<?php //the_permalink(); ?>" title="Read full post"><?php echo "Test Post";//the_title(); ?></a></p>
<h4>Latest Blog Post on <?php //the_time('jS F') ?>Tues, 4th</h4>
<span>I am a creative student based in the United Kingdom. I design and create beautiful things for the web. Three things are important to me when making the design...Standards Compliant Code, Functional Design, Usability and Accessibility.</span>
<?php //the_excerpt(); ?>
<?php //endwhile; ?>
    </div>
    <div class="blogroll" style="width: 275px; padding-left: 5px; padding-right: 5px;">
<?php //while (have_posts()): the_post(); ?>
<p class="blogtitle"><a href="<?php //the_permalink(); ?>" title="Read full post"><?php echo "Test Post";//the_title(); ?></a></p>
<h4>Latest Blog Post on <?php //the_time('jS F') ?>Tues, 4th</h4>
<span>I am a creative student based in the United Kingdom. I design and create beautiful things for the web. Three things are important to me when making the design...Standards Compliant Code, Functional Design, Usability and Accessibility.</span>
<?php //the_excerpt(); ?>
<?php //endwhile; ?>
    </div>
    <div class="blogroll" style="width: 275px; padding-left: 10px;">
<?php //while (have_posts()): the_post(); ?>
<p class="blogtitle"><a href="<?php //the_permalink(); ?>" title="Read full post"><?php echo "Test Post";//the_title(); ?></a></p>
<h4>Latest Blog Post on <?php //the_time('jS F') ?>Tues, 4th</h4>
<span>I am a creative student based in the United Kingdom. I design and create beautiful things for the web. Three things are important to me when making the design...Standards Compliant Code, Functional Design, Usability and Accessibility.</span>
<?php //the_excerpt(); ?>
<?php //endwhile; ?>
    </div>
    </div>
    <div id="footer" style="">
      <p>Design &#169; <?php echo date('Y');?> <a href="http://minihobbs.co.uk" title="Minihobbs">Minihobbs.co.uk</a></p>
    </div>
  </div>
</div>

</body>
</html>

 

If anyone could help out, thanks in advance.

Link to comment
Share on other sites

I have it working for me with only the code you posted.

 

I get a sideways layout of 3 entries and then the footer at the bottom.

 

From My Blog

Latest Blog Post on Tues, 4th    Latest Blog Post on Tues, 4th      Latest Blog Post on Tues, 4th

                                                                                                                  Footer

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.