WordPress.org

Ready to get started?Download WordPress

Forums

Min-Max height css not working with wordpress (12 posts)

  1. Prateek
    Member
    Posted 1 year ago #

    Min-Max height css code not working with wordpress :/ i try everything but it just do not work

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

  3. Prateek
    Member
    Posted 1 year ago #

    sorry

    creating a new template for my website

    and having issue with minimum and maximum height function

    here is the code

    #main{
    width:100%;
    min-height:400px;
    max-height:2000px;
    margin:auto;
    margin-top:25px;
    margin-bottom:50px;
    }
    
    single.php code
    
    <div id="main">
      <div id="main2">
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <h1> <a>"> <?php the_title(); ?></a></h1>
        <h4>Posted on <?php the_time('F jS, Y') ?></h4>
    	<h4> About Author -
    	<?php
    	the_author_description();
    	?>
    	</h4>
    	<p></p>
        <p><?php the_content(); ?></p>
    <?php get_header(); ?>
    	</BR></BR>
    	<h6>Posted By <?php echo get_the_author() ?> | <?php echo comments_number('No comment', '1 comment', '% comments'); ?> 	</h6>
        </BR>
    	<?php comments_template(); ?>
    	</BR>
    	<hr>
        <?php endwhile; else: ?>
        <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
        <?php endif; ?>
      </div>
    
      <?php get_sidebar(); ?>
    
      </div>

    the theme is at http://edenhost.me

  4. It's working: Your #main div is exactly 400px high. So I wonder if you were trying to target some other piece of content, and had the wrong name? What are you actually trying to make 400px?

  5. Prateek
    Member
    Posted 1 year ago #

    min-height just work fine

    its max which is making me go mad

    http://edenhost.me/?p=1

  6. Do you mean the way the footer is overlapping the content? That's nothing to do with your min/max height. It's because you have .footer {position: absolute} in there.

  7. Prateek
    Member
    Posted 1 year ago #

    can you help me fix it please?

    check it after i remove that property

  8. J
    Member
    Posted 1 year ago #

    What are you trying to achieve on the page exactly?

  9. Prateek
    Member
    Posted 1 year ago #

    http://edenhost.me/?p=1

    if you go here you will check after 400px footer background come which it should not come

    i am trying to convert a html / css base design to wordpress theme

  10. J
    Member
    Posted 1 year ago #

    Ah ok,

    Change -

    .footer {
        background: url("images/footer_bg.gif") repeat scroll 0 0 transparent;
        color: #6C727B;
        font-size: 13px;
        height: 320px;
        margin: auto;
        width: 100% !important;
    }

    Too

    .footer {
        background: url("images/footer_bg.gif") repeat scroll 0 0 transparent;
        clear: both;
        color: #6C727B;
        font-size: 13px;
        height: 320px;
        margin: auto;
        width: 100% !important;
    }

    I just added clear: both; so it takes into account the min-height/max-height css properties

    Hope this helps
    J

  11. Prateek
    Member
    Posted 1 year ago #

    Thanks it work great Thank you both of you for great and quick help

  12. J
    Member
    Posted 1 year ago #

    No problemo, glad it helped.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.