WordPress.org

Ready to get started?Download WordPress

Forums

Different style for comment by post author in twentytwelve & CSS3 tip (12 posts)

  1. Dr. Ashok Koparday
    Member
    Posted 1 year ago #

    (NSFW Sexual Health Education Site)
    Hi,
    [1]
    I wish to have comments by post author appear different from the rest of the comments. It's a single author site. I am not able to figure out which css #id, .class to change.
    [2]CSS3 text shadow hack for IE browser

    [1}
    I am using a child theme for twentytwelve.
    What I have tried?
    Changing the class below does not bring about changes.

    .comments-area li.bypostauthor cite span {
    position: absolute;

    However, with the class below I could change the margin.

    .comments-area article header time {

    I searched style.css comment.php comment-template.php and the internet.

    [2]
    I have CSS3 text shadow for website title. IE 9 shows blank space in place of title. What's the way out?
    However, changes applied to post title are seen in IE 9 browser.

    I will appreciate your valuable expertise and time to resolve the above issues.

    Best,
    Dr. Ashok Koparday

  2. egado
    Member
    Posted 1 year ago #

    [1] styling comments:
    http://www.wpbeginner.com/wp-themes/how-to-style-your-wordpress-comments-layout/

    [2] title in IE9
    Hmm... can you please post the your css for the title or better a link to the site?

  3. Dr. Ashok Koparday
    Member
    Posted 1 year ago #

    Hi egado,

    The site is http://mydoctortells.com/

    I appreciate your prompt reply.

    I began with wpbeginner.

    I however, didn't find

    .commentlist li ul.children li.comment-author-admin {}

    this in twentytwelve style.

    [2]

    h1 {
      	text-shadow: 0 1px 0 #ccc,
                   0 2px 0 #c9c9c9,
                   0 3px 0 #bbb,
                   0 4px 0 #b9b9b9,
                   0 5px 0 #aaa,
                   0 6px 1px rgba(0,0,0,.1),
                   0 0 5px rgba(0,0,0,.1),
                   0 1px 3px rgba(0,0,0,.3),
                   0 3px 5px rgba(0,0,0,.2),
                   0 5px 10px rgba(0,0,0,.25),
                   0 10px 10px rgba(0,0,0,.2),
                   0 20px 20px rgba(0,0,0,.15);
    }
    widget-area {
    	margin: 24px 0 0;
    	margin: 1.714285714rem 0 0;
    }
    .site-header h1 a {

    I have above code in twentytwelvechild theme style.css
    Any leads?

  4. egado
    Member
    Posted 1 year ago #

    Try this (just for testing) in your child theme style.css

    .commentlist > li.bypostauthor {
        background: red;
    }

    This should create a red background for author comments.

    text-shadow IE9

    http://caniuse.com/#feat=css-textshadow
    http://www.normansblog.de/demos/browser-support-checklist-css3/

    As you can see, IE9 does not support css3 text-shadow, so you will need a fallback for IE < 9

  5. Dr. Ashok Koparday
    Member
    Posted 1 year ago #

    Thank you egado.

    The code you gave isn't showing red background.

    Has it something to do with 'specificity'?

    IE 9 shows text shadow for my 'Post title'.

    (If you don't mind asking your site egado.de doesn't open. Is there some magic entrance?)

    Thanks for you prompt support.

    Best,
    Ashok Koparday

  6. egado
    Member
    Posted 1 year ago #

    Hmmm... have a look at this screenshot I made from it:
    http://www.egado.de/wp-support/red-bg.png

    No idea for the IE9 problem at the moment (no time for further testings) :(
    //EDIT
    My IE9 dont shows text-shadow

    I know :) there is nothing more then this "coming soon" site ;)

  7. Dr. Ashok Koparday
    Member
    Posted 1 year ago #

    Thank you egado for your valuable time and expertise.

    Egado, I am not able to get the same effect. Not only that, but my firebug does not show the code that you can see.

    Firefox http://media-cache-ec3.pinimg.com/originals/27/50/e2/2750e28812238a4c9d7b628e0f0ec4af.jpg

    chrome http://media-cache-ec4.pinimg.com/originals/17/9d/b3/179db36cb058dd476b86a7776cbfbcaa.jpg

    Mystery?

    Thanks again for sparing time.
    Best,
    Ashok Koparday

  8. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    can you post a direct link to a post with a comment by the author?

    the default Twenty Twelve theme adds the css class .comment-author-admin and .bypostauthor to a comment by the post's author; you can use that to style the comments different.

    if this css class is missing in your site (using a child theme) this might be caused by a plugin (?)

  9. Dr. Ashok Koparday
    Member
    Posted 1 year ago #

    Hello,
    Thank you for sparing your precious time.

    This post has comments
    http://mydoctortells.com/everything-about-premature-ejaculation/

    There is no .comment-author-admin in twentytwelve style.css.

    When I change css to this class
    .comments-area li.bypostauthor cite span {
    it does not take any effect.

    However, with the class below I could change the margin.
    .comments-area article header time {

    Kindly guide.

    Dr. Ashok Koparday

  10. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    when you are commenting or replying to a comment, are you sure you are logged in under the same account as the post author? or as admin?

    to check if one of the plugins is interfering, temporarily deactivate all plugins to see if that changes anything.

    I ran a test with a unedited Twenty Twelve, and the comment replies by the post author/admin are getting the mentioned css classes; I am therefore at my end of suggesting any remedy.

  11. Dr. Ashok Koparday
    Member
    Posted 1 year ago #

    Oh!

    [1]

    I will reconfirm if the comment replies have been done when logged in.

    You are saying that I should be getting
    .comment-author-admin and
    .bypostauthor classes and style attributes applied to them should show up. I need to check the plugins. Okay.

    [2]
    CSS 3 for site title does not show on Internet Explorer 9. IE 9 displays CSS 3 on other classes.

    Is it because of 'specificity', meaning in the cascading style the main id attributes override other classes below it? Or is it something else?

    Thanks for your attention and reply.

    Dr. Ashok Koparday

  12. Dr. Ashok Koparday
    Member
    Posted 1 year ago #

    Thank you alchymth.

    Thanks egado.
    [1]
    alchymyth, you are right. All the comments have not been posted by me when logged in.

    Those comment replies posted as post author could be styled only with this.

    .bypostauthor {
    background-color: #fbfbfb !important;

    [2]
    IE 9 browser is showing all CSS 3 except the site title. Any ideas on that?

    Thanks for your time and expertise.

    Dr. Ashok Koparday

Topic Closed

This topic has been closed to new replies.

About this Topic