• So I wanted to make my name on my blog red. I added this into style.css

    a[href="/author/admin"]{
    color: red;
    }
    <a href="/author/admin">ItsGreg</a>

    I uploaded it to my server, and my name was red.
    So, since i’m not the only admin, I wanted to change my friend’s name to red as well. So I just copied the css, pasted it under the one I already had, and changed the link and name, but only my name was red. So I deleted my name from it, and pased it under the other admin’s name, then only his name was red..
    How to I make both of our names red? Or, how to I make our names different, like mine green and his blue?

Viewing 4 replies - 1 through 4 (of 4 total)
  • looks like you are going about things a bit wrong….. in your css you only include styling for elements.

    like

    a {
    	color: red;
    	text-decoration:none
    	}

    any links like <a href="/author/admin">ItsGreg</a> go in your theme’s php file (although your link is not formed properly)

    I think you may need to read up a bit on themes, and css. But for specific help we need a link to your site.

    a lot of themes have a section like this in index.php:
    <div class="author">Posted by <?php the_author(); ?></div>

    that controls display of the authors name on a post

    the div part calls to your css
    you can then style the div in your css like:

    .author {
       color: red;
     }

    Thread Starter ItsGreg

    (@itsgreg)

    well, I don’t want everybody’s name red. Only Mine, and other admin’s.
    https://failblog.si

    It looks like your author link is wrapped in a <p> with a class of author, so try this:

    p.author a,
    p.author a:link,
    p.author a:active,
    p.author a:visited { color:red; }
    Thread Starter ItsGreg

    (@itsgreg)

    again, it changes everyone’s name to red. I don’t want that. I only want mine and another admins red.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CSS Problems’ is closed to new replies.