Forum Discussion

Quelyn's avatar
Quelyn
Genius
10 years ago

CSS Question: Override or Cancel default style

So, I am working on my theme and whenever I made a change within the WYSIWYG TinyMCE editor to a table row background, it doesn't appear until the KB is published.  I looked in the CSS and it looks like it is because that rule is hard set in the default CSS: 

  

body#lia-body .lia-content, .mceContentBody, .mceContentBody th, .mceContentBody td, .mce-content-body, .mce-content-body th, .mce-content-body td {
background-color: #ffffff;
color: #333333; font-size: 16px; line-height: 21px; font-family: proxima-nova,sans-serif; font-weight: normal; }

What I am not sure of is how I could use my custom CSS to over-ride that rule.  I don't want to change "background-color" to another value, I want that value to be disregarded.  

 

Any help on how to accomplish this is appreciated! 

  • Quelyn 

     

    I'm far from being a CSS expert, but if no one esle respond, you could give that a go ...

     

    When adding a Table in TinyMCE, it looks like the class is "mce-item-table"

     

    In your css, you could add:

     

    .mce-item-table td {

    background-colour:transparent;

    }

     

    or:

     

    .mce-item-table td {

    background-colour:none;

    }

     

    Note: you probably don't need to go to the pain of changing your CSS and publishing it to see if it works or not. You can add / change CSS style on the fly with FireBug (for FireFox) or any web developer tools on Chrome / IE /Safari

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)

    Quelyn 

     

    I'm far from being a CSS expert, but if no one esle respond, you could give that a go ...

     

    When adding a Table in TinyMCE, it looks like the class is "mce-item-table"

     

    In your css, you could add:

     

    .mce-item-table td {

    background-colour:transparent;

    }

     

    or:

     

    .mce-item-table td {

    background-colour:none;

    }

     

    Note: you probably don't need to go to the pain of changing your CSS and publishing it to see if it works or not. You can add / change CSS style on the fly with FireBug (for FireFox) or any web developer tools on Chrome / IE /Safari

    • Quelyn's avatar
      Quelyn
      Genius
      :O That's a good call! I'm still getting my feet wet in CSS, I should have thought of that one.

      For the record "None" didn't work, but "Transparent" did!
      • Quelyn's avatar
        Quelyn
        Genius

        Here's what I added: 

         

        #lia-body.mceContentBody, .mceContentBody th, .mceContentBody td, .mce-content-body, .mce-content-body th, .mce-content-body td
            {
            background-color: transparent;
            }