WordPress.org

Ready to get started?Download WordPress

Forums

Floating div problem in IE (but Firefox OK!) (3 posts)

  1. kitchenwench82
    Member
    Posted 6 years ago #

    To be brief, I'm having a problem getting the date to appear properly:

    http://www.insanitytheory.net/images/floatdiv.gif

    Looking at this previous topic (http://wordpress.org/support/topic/106653?replies=4) I think my code should be OK, but I can't figure out why it won't sit correctly in IE (though its perfectly fine in Firefox)

    In the post header:

    <div class="post_date">
    <div class="date_post"><?php the_time('j') ?>&nbsp;<?php the_time('M') ?></div>
    <div class="year_post"><?php the_time(' Y') ?></div>
    </div>

    In style.css:

    .post_date {
      	background: url('images/datebg.jpg');
    	background-repeat: no-repeat;
    	clear:left;
    	float:left;
    	margin-right:5px;
    	position:relative;
    	width:42px;
    	height:40px;
    }
    .date_post {
    	border-bottom:1px dotted;
    	clear:left;
    	color:#2C4353;
    	float:left;
    	font-size:12px;
    	font-weight:400;
    	padding-top:2px;
    	text-align:center;
    	width:42px;
    }
    .year_post {
    	float: left;
    	clear: left;
    	width: 42px;
    	font-size: 14px;
    	color: #2C4353;
    	text-align: center;
    	padding-bottom:2px;
    }

    (I know that all the graphics etc are out of whack, but they are the original theme ones and once I'm done with the code, I'll be giving the entire site a huge retro green overhaul!)

  2. SusieN
    Member
    Posted 6 years ago #

    I'm not 100% sure on this, but it looks like the double-margin float bug IE has. Try adding display: inline; to .post_date .

    IE Doubled Float-Margin Bug

  3. kitchenwench82
    Member
    Posted 6 years ago #

    Hi Susie,

    Thanks for the reply :) I gave that a shot but it looks like its not that particular bug as it didn't change a thing :(

Topic Closed

This topic has been closed to new replies.

About this Topic