May 16, 201214 yr Heyy guys.. I've been trying to create a WordPress theme based off a HTML page I created, but because of the way wordpress is coded, I am having some difficulties with the CSS. This is what I am trying to achieve: Here's the code from the normal HTML page: <div class="design"> <div class="design-details"> <h2>Design 1</h2> <p>This design is being used as an example so that I can work out how the page design looks.</p> </div> <div class="design-details-preview"> <img src="img/design1.png" /> </div> </div> Here's the code from the Wordpress HTML: <div class="design"> <div class="design-details"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_content(); ?> </div> </div> Here's the CSS used for both pages: .design{ width:900px; margin: 0 auto; padding: 35px 0; clear: both; } .design:after { clear:both; } .design-details{ padding-left: 20px; width: 40%; float:right; } .design-details h2{ padding-bottom: 5px; box-shadow: 0 1px 0 #0099cc, 0 2px 0; color:#fff; } .design-details p { color: #fff; line-height: 22px; } .design-details-preview img{ margin: 0 auto 30px auto; max-width: 100%; display: block; } .design-details-preview { width: 50%; float: left; position: relative; } I know the WordPress code is missed a Div, but I can't seem to fit it into the code. Inside the Wordpress post is Title which is "Hello World" and the body which is "Welcome to WordPess. This is your first post. Edit or delete it, then start blogging! <img src="http://localhost:40639/wp-content/uploads/2012/05/design.jpg" alt="" />" Please could anyone help me solve this issue? Thanks in advance and Sorry it's a very long post.
May 17, 201214 yr <div class="design"> <div class="design-details"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_content(); ?> </div> <div class="design-details-preview"> <?php the_post_thumbnail(); ?> </div> </div>
May 17, 201214 yr Are you setting a Featured Image? Do that, and remove any images you've inserted into the post. Renaissances code is sound.
May 17, 201214 yr Author Are you setting a Featured Image? Do that, and remove any images you've inserted into the post. Renaissances code is sound. Did that and it worked perfect, thank you!
Create an account or sign in to comment