Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6664047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:34:00+00:00 2026-05-26T02:34:00+00:00

I am working with the wordpress theme, it generates the html output of comments

  • 0

I am working with the wordpress theme, it generates the html output of comments automatically.
The HTML output is like:

Author says:
August 30, 2011 at 6:43 pm  (Edit)
The comment text...
Reply.

I need to change the position of the elements. For example, I would like to display the author, date/edit and reply on one line.
like:

Author says:    August 30, 2011 at 6:43 pm  (Edit)  Reply
The comment text...

As I said above, I can not change the HTML structure, so I need to change the positions of elements with CSS only. However I’m uable to do so.
I’ll appriciate any help.

Here is the generated html:

<div class="comment-body" id="div-comment-33">

        <div class="comment-author vcard">
            <img width="48" height="48" class="avatar avatar-48 photo" src="http://i55.tinypic.com/21buau9.jpg" alt="">     

            <cite class="fn">
                <a class="url" rel="external nofollow" href="#">Author</a>
            </cite> 
            <span class="says">says:</span>     

        </div>

        <div class="comment-meta commentmetadata">
            <a href="#comment-33">August 30, 2011 at 6:43 pm</a>&nbsp;&nbsp;
            <a title="Edit comment" href="#" class="comment-edit-link">(Edit)</a>       
        </div>

        <p>The comment text...</p>

        <div class="reply">Reply</div>
</div>

jsFiddle link:

http://jsfiddle.net/GLwfW/1/

PS. I know we can change the HTML output by adding custom function in wordpress, but that’s not an option.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:34:01+00:00Added an answer on May 26, 2026 at 2:34 am

    You can start with display:inline-block; on the first few elements:

    .comment-body{
        border:1px solid green;
        position:relative;
    }
    
    .comment-author, .comment-meta{
        display:inline-block;
    }
    
    .reply{
        position:absolute;
        top:34px;
        left:360px;
    }
    

    Then give a position:absolute; to the .reply. You may need to fiddle with these numbers.

    Example: http://jsfiddle.net/GLwfW/9/


    EDIT

    Based on @Diodeus’s comment re

    You can try absolute positioning — until the author’s name is long,
    which will then force “reply” to be on top of the text that was
    normally to the left of it.

    One thing to do is detach the reply from the DOM and re-insert it. So

    New CSS

    .comment-body{
        border:1px solid green;
        position:relative;
    }
    
    .comment-author, .comment-meta, .reply{
        display:inline-block;
    }
    

    Some JS

    var a = $('div.reply').detach();
    
    a.appendTo('.comment-meta');
    

    Revised Example: http://jsfiddle.net/GLwfW/10/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Sandbox based Wordpress theme and I would like to add
I'm working on the stylesheet for a wordpress template (http://newwpthemes.com/techzilla-free-wordpress-theme/). I would like the
A wordpress theme I'm working on has headlines which span across the entire content
I'm working with a WordPress plugin. It adds a flash player to the output
I'm working on a wordpress site, with a blog post that ends like: http://www.blog.com/?p=2
I'm working on WordPress theme which has some custom functionality which includes the ability
I'm working on a wordpress theme, and I have a rather unique structure that
I'm working on a wordpress theme that uses dropdowns for part of the site
I'm working on delving into more complex WordPress theme options pages. Right now, I
I'm working on a custom wordpress theme with a little bit of backend admin

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.