Twenty Eleven: Created "Class" for links – is there a better way?

  • Author
  • #878200


    I’m beginning to learn my way around this CSS, and I know a little information can be dangerous. :-)

    I want to have only the links I add in a post to be a certain color, and be underlined. Not all the links, such as those in the widgets and the dates, categories, tags, etc, for each post. Only a link I add.

    Which meant that:

    a {
    text-decoration: underline;
    color: #244fb0;

    didn’t work for me, since it changed everything.

    I created this class rule and added it: {

    and in a post, I add class=”blue” in the html < a > tag. It works! (Which is very exciting, in terms of the learning part.)

    But… before I get too attached to this, will it cause problems later on (other than needing to remember to add the class=”blue”) or is there a better way?

    Thank you!

    The blog I need help with is


    My suggestion on this would be to create a more specific rule that targets only the links in the content of posts and pages and that way you don’t have to worry about adding a “class” to each link when you create them. Delete the you have and give this a try.

    .entry-content a {
    color:#244fb0 !important;


    Happy Friday to you. :)


    thesacredpath, nice to see you!!


    Happy Friday to you timethief and to all. I’m in countdown mode to happy hour and Hawaiian music.

    @designsimply, thanks and nice to be seen. :-)



    It’s only 2:00 PM! I’m going to put on some ♫ slack string guitar music ♫ and raise a toast to you after work. :) Aloha


    @TT thanks and I’ll do the same for you tonight.





    Thank you so much, the sacredpath! No remembering needed now – phew!

    I added .comment-content so it does the same in comments, too.

    Being steered in the right direction makes all the difference, thank you all for being so gracious and helpful, not to mention patient.


    You are welcome.

The topic ‘Twenty Eleven: Created "Class" for links – is there a better way?’ is closed to new replies.