Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Wordpress theme layout

Featured Replies

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:

30l02o7.png

 

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.

<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>

Are you setting a Featured Image? Do that, and remove any images you've inserted into the post. Renaissances code is sound.

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.