Page 1 of 1

how to override s2member.css?

PostPosted: August 24th, 2011, 5:32 am
by mrstth
Hi,
I'm wanting to edit the css of the grey return page after paypal, and have found /wp-content/plugins/s2member/includes/s2member.css, which appears to control body.s2member-return-body etc.

A note in that css file says
"These are basic CSS rules. You can override any of these through the `/style.css` file for your WordPress® theme."
- however, adding an alternative style in /style.css of my child theme doesn't appear to make any difference at all.

As it's the body element, there's no way I can see to trump it, and any edits to the original s2member.css, would obviously be overwritten when I upgrade.

I saw this thread but don't completely understand Jason's suggestion here:
The easiest way to recreate and/or override s2Member's CSS, is to load up your site with s2Member's default CSS file, as it is created dynamically, based on your configuration of s2Member. Then download the whole file by loading up: http://yoursite.com/?ws_plugin__s2member_css=1


I can view the CSS that way, but it's a one-line file, which is almost entirely impenetrable when copied and pasted into a text editor; also, even if I did edit it, I'm not sure where to put it..

Any suggestions very welcome!
Thanks
-sam

Re: how to override s2member.css?

PostPosted: August 25th, 2011, 12:36 am
by Cristián Lávaque
Have you tried using !important in your rules to override s2Member's? http://webdesign.about.com/od/css/f/blcssfaqimportn.htm

Re: how to override s2member.css?

PostPosted: August 25th, 2011, 8:54 am
by mrstth
Hi again Cristián,
thanks again for responding.
I have used that rule before, yes, but the paypal return page I wanted to style calls a separate stylesheet (s2member.css), so I can't see how anything in my styles.css can apply to it;

Have just hacked the source file in the end, at /wp-content/plugins/s2member/includes/classes/utils-html.inc.php to echo my child theme's style.css after the first one, in which I've added my own styling. Will make a note that I'd need to edit it again after any upgrades.

If anyone has a more elegant solution I'd love to hear it :)
Thanks again
-sam