Title: Styling comments using &quot;li.comment-author-admin&quot; using custom Functions
Last modified: August 20, 2016

---

# Styling comments using "li.comment-author-admin" using custom Functions

 *  [salomon.meij](https://wordpress.org/support/users/salomonmeij/)
 * (@salomonmeij)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/styling-comments-using-licomment-author-admin-using-custom-functions/)
 * Hello,
 * I’m having a bit of a problem. Since I wanted to customize comments more than
   standard CSS allows, I had to use the functions.php to call for differently set
   up comments. I required the comment text to be first, contained in a speech bubble,
   with the author name and date underneath the bubble. This required the comment-
   text php calls to be in a separate div from the comment author and date calls.
 * See: [comments image](http://dl.dropbox.com/u/564980/wordpress/comments.png) (
   I added div markers etc)
 * However, I ran into a problem, I actually want to style the speech boxes differently
   if they’re made by an admin. Normally, you would do this using the “li.comment-
   author-admin” styling, however, this’ll apply to the whole comment “box”, so 
   to speak, and not just the div containing the speech text which is styled a speech
   bubble. As a result, the speech bubble isn’t styled differently, but the space
   around it is.
 * I was wondering how can I add a “li.comment-author-admin” command to my custom
   div that I use to create my speech bubble?
 * You can take a look at the actual code here, if it helps:
 * [comments.php](http://dl.dropbox.com/u/564980/wordpress/comments.php)
    [style.css](http://dl.dropbox.com/u/564980/wordpress/style.css)
   [functions.php](http://dl.dropbox.com/u/564980/wordpress/functions.php)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [salomon.meij](https://wordpress.org/support/users/salomonmeij/)
 * (@salomonmeij)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/styling-comments-using-licomment-author-admin-using-custom-functions/#post-2318325)
 * Nobody? I just can’t get it to work and it’s driving me nuts!
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/styling-comments-using-licomment-author-admin-using-custom-functions/#post-2318345)
 * please use the [http://pastebin.com/](http://pastebin.com/) (see [http://codex.wordpress.org/Forum_Welcome#Posting_Code](http://codex.wordpress.org/Forum_Welcome#Posting_Code))
   for your code; and post a link to your site.
    formatting issues can best be discussed
   seeing the problem live.
 *  Thread Starter [salomon.meij](https://wordpress.org/support/users/salomonmeij/)
 * (@salomonmeij)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/styling-comments-using-licomment-author-admin-using-custom-functions/#post-2318363)
 * Funtions.php: [http://pastebin.com/8QENEQpv](http://pastebin.com/8QENEQpv)
 * Comments.php: [http://pastebin.com/nCMfs04p](http://pastebin.com/nCMfs04p)
 * Style.css: [http://pastebin.com/Fz50Y4hG](http://pastebin.com/Fz50Y4hG)
 * Sadly I can’t link to my website, cause it’s currently running on localhost and
   I haven’t set up an actual web host yet. The image shows how it renders, though.
   Sorry for the inconvenience.
 * As for the code, I messed up something in the code as well that breaks parts 
   of WordPress, some pages don’t open anymore. However, I figured I’d fix that 
   later, after I figure out how to fix my styling.
 * If you look in the functions.php, what I would like to do is give the divs
 * <div class=”replyimg”>
 * and
 * <div class=”comment-text”>
 * An ID like “ol.commentlist li.comment-author-admin” that WordPress gives to comments
   by default. I basically sliced my comment up into separate divs, instead of one
   big comment, but I would like fine control over those separate divs using the
   functions like “ol.commentlist li.comment-author-admin”.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Styling comments using "li.comment-author-admin" using custom Functions’
is closed to new replies.

## Tags

 * [author](https://wordpress.org/support/topic-tag/author/)
 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [comments.php](https://wordpress.org/support/topic-tag/comments-php/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [style.css](https://wordpress.org/support/topic-tag/style-css/)
 * [styling](https://wordpress.org/support/topic-tag/styling/)

 * 3 replies
 * 2 participants
 * Last reply from: [salomon.meij](https://wordpress.org/support/users/salomonmeij/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/styling-comments-using-licomment-author-admin-using-custom-functions/#post-2318363)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
