WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Featured post layout with H2 and Post-Thumbnail (3 posts)

  1. marblestech
    Member
    Posted 2 years ago #

    I Have a problem with making a featured post with an overlaying title, i have tried position:relative; and putting the top to -70px; to overlap but it wont work, here's my current code :

    #feat-post-title{
    	background:url(http://www.marblestech.com/wp-content/uploads/bg.png);
    	color:#fff;
    	font:15px arial;
    	width:560px;
    	padding:20px;
    	margin-bottom:-30px;
    }
    <h2 id="feat-post-title"><?php the_title(); ?></h2>
    
    				<div id="feat-post-img">
    					<?php
    						if ( has_post_thumbnail() ) {
      							the_post_thumbnail();
    						} 
    
    					?>
    				</div>

    Anyone got any ideas, any input would be greatly apperciated! :)

  2. marblestech
    Member
    Posted 2 years ago #

    Found out how, used display:inline-block with a container.

  3. steveone86
    Member
    Posted 2 years ago #

    Hey, can you post the whole code as i am trying to do the same thing Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic