Min-Max height css not working with wordpress
-
Min-Max height css code not working with wordpress :/ i try everything but it just do not work
-
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
It’s working: Your
#maindiv 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?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.can you help me fix it please?
check it after i remove that property
What are you trying to achieve on the page exactly?
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
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 propertiesHope this helps
JThanks it work great Thank you both of you for great and quick help
No problemo, glad it helped.
The topic ‘Min-Max height css not working with wordpress’ is closed to new replies.