We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4070
    • 14 Posts
    Hi all,

    I have recently setup a blog using the http://rtfm.modx.com/display/revolution20/Creating+a+Blog+in+MODx+Revolution, which all is working fine.

    I want to style the css, I can get some to follow my css but others, for instance the tags stay a light green blue and I have it styled as dark red, although I have the title Tag set to the color I am using.
    I seem to always be stumped when it comes to the css styling.

    Below .blog-post, .post-info, .comments are all classes. Which is the best way!


    <div id="content" class="blog-post">
    <h2 class="title"><a href="[[~[[*id]]]]">[[*pagetitle]]</a></h2>

    <p class="post-info">
    Posted on [[*publishedon:strtotime:date=`%b %d, %Y`]] |
    Tags: [[*tags:notempty=`[[!tolinks? &items=`[[*tags]]` &key=`tag` &target=`1`]]`]] |
    <a href="[[~[[*id]]]]#comments" class="comments">
    Comments ([[!QuipCount? &thread=`blog-post-[[*id]]`]])
    </a>
    </p>

    Thankyou
      • 32316
      • 387 Posts
      and I have it styled as dark red
      You don’t say how you tried to style the tags - seeing the css would help

      But I have a suggestion - Figure out what is wrong by yourself and you will learn much more. - If you haven’t tried this - use the web developer tools in Opera, Firefox, Chrome or Safari and look at the css that is styling your tags, in some or all of those browsers you can right click (PC) or control click (Mac) and they will bring up a menu, select inspect element and you willl be presented with the css for that element. A great learning tool and for those occasions when you know you did it right, except its not working and ... duh!
        • 3109 ☆ A M B ☆
        • 894 Posts
        Are you using your own classes or are you keeping the same ids and classes from the tutorial.

        It’s always best to use your own css names and ids so you know for sure theres not some built in classes changing your stuff.

        If the tags are links (which I assume they are) you need to target them.

        Easiest way to do that looking at your code would be using:

        
        .blog-post a{
            color:#f00;
        }


        for all links inside this div or

        .post-info a{
            color:#f00;
        }


        for any links inside the paragraph with the .post-info class.

        Hope that helps.
          Benjamin Marte
          Interactive Media Developer
          Follow Me on Twitter | Visit my site | Learn MODX
          • 4070
          • 14 Posts
          Thanks for all your help, all has been worked out and back to designing. Thanks smiley