-
AuthorPosts
-
December 20, 2017 at 11:30 am #890737
Hi,
i had defined my own custom table styling created offline (link to jsfiddle) as I didn’t want to use the theme’s own table styles. However, it seems that the theme’s table styling is adding some styles which I do not want.
This is how it looks without the theme styling:
This is how it looks when I put in the theme (code block on page, css in Quick CSS)
Do I have have to define css to override everything that the theme’s own styling has for tables? Or is there a simple way to “mute” the theme’s own table styling (without it overriding when I update the theme)? I am unlikely to ever use the theme’s own table styles.
Thanks in advance.
Kind Regards
DavidDecember 20, 2017 at 5:19 pm #890858Hey David,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaDecember 20, 2017 at 5:45 pm #890872Hi Victoria,
Details below. The website is in coming soon state, so you need to go via the admin portal. The table is on the page I’ve stated below. The link to the jsfiddle is in my original post.
Thanks & Kind Regards
DavidDecember 21, 2017 at 10:44 am #891061Hi,
Please try the following in Quick CSS under Enfold->General Styling:
.avia_codeblock table tr:nth-child(odd) { background:#fff !important; }
Best regards,
RikardDecember 21, 2017 at 11:06 am #891072Thanks, but the alternating background is just one part of the styling I want to remove.
The question is: do I really need to define styles to override every part of the theme’s table styles that I don’t want with an “!important” declaration (cell text vertical and horizontal align, borders, margins, text transform)? I don’t think that’s particularly ideal, and not good css practice. I may wish to add another codeblock table styled differently.
What I would like to do is just remove all of the theme’s table styling – is that possible?Kind Regards
DavidDecember 21, 2017 at 5:38 pm #891226Hi David,
You don’t always need to use !important. Many times you need to specify an additional class to increase the selector specificity and the styles will work. Or you can give your tables a special class and write css using the class.
Best regards,
VictoriaDecember 21, 2017 at 10:45 pm #891393Hi Victoria,
That’s fine.
I had defined a specific class for the table, but where I hadn’t defined a bit of css (where it wouldn’t be otherwise needed) it used the theme default instead. So I’ve had to define css to override the theme defaults to get the result I was looking for (which I was hoping to avoid!)
Thanks & Kind Regards
DavidDecember 22, 2017 at 12:28 am #891428Hi,
Did you need additional help, or shall we close this topic?
Best regards,
Jordan Shannon -
AuthorPosts
- You must be logged in to reply to this topic.