Get a free trial // Grow your CSS skills // Land your dream job

Trying to Highlight Author comments

  • # October 20, 2009 at 7:29 pm

    Using this code in the comments.php

  • user_id)
    $oddcomment = “authcomment”;
    echo $oddcomment;

with CSS

.authcomment {
background-color: #B3FFCC !important;

Can’t get it to work. Any Ideas?

You can find an author comment(Barbara) at the bottom of this post.

# October 21, 2009 at 4:33 am

You have curly quotes, or "smart quotes" – the kind generated by Microsoft Word – in your code. PHP won’t recognise them so make sure you use a programmers text editor to edit PHP files, and only use " and ‘ for quotation marks.

  • PS. You can use Notepad++ on the PC and TextWrangler on Mac.

    # October 21, 2009 at 8:07 am

    Yea, I was wondering about those question marks. But I am using Coda. Those lines are generated by PHP right?

    # October 21, 2009 at 8:35 am

    As Dave said, change



    # October 21, 2009 at 6:31 pm

    Ok, I got that changed, but I’m still seeing the question marks. Any other ideas?

    # October 21, 2009 at 6:49 pm

    You have 4 funny quotes to fix – one on the line starting <li class=", 2 on the line starting $authcomment = and 1 on the ?>" line.

    I think if you get them all it will solve your problem.


    # October 21, 2009 at 7:16 pm

    Thanks a million. :ugeek:

    Viewing 7 posts - 1 through 7 (of 7 total)

    You must be logged in to reply to this topic.

    There's a whole bunch of content on CSS-Tricks.

    Search for Stuff   •   Browse the Archives

    Get the Newsletter ... or get the RSS feed