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

    A noob question for you.

    I seem to be stumped on this really simple task.. I need two different link styles to display in my modx site.
    One style is a left sidebar Links which sit on a dark background and the links are white. Now the problem with that is when I enter content within modx and I add my link the links are white and the background where the main content sits is also white.

    I added a custom css class for the link colors, and updated the mc editor. It does not seem to be selectable from within the editor. Another thing I tried is to use the css functions from within the editor. I highlighted link gave it a color and presto.. nothing happens links are still white. I also tried the !important with no success.

    Perhaps adding different css classes to my main css file was the way to go. I am just not sure how to make it an easy consistent process of selecting to add a link in the editor and having it apply a link style that is different from the left sidebar. Any thoughts and or ideas?
      • 18374
      • 69 Posts
      Personally, I’d just update your main CSS file and let it automagically handle the style for you (based on location in the DOM) rather than having to explicitly set it every time in the RTE.

      a { color: white; }
      div#links a { color: red; }