PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

How do I create CSS for each Custom Class in Editing Reg?

Common Questions/Problems/Tips. Posted by Administrators & Support Reps.

How do I create CSS for each Custom Class in Editing Reg?

Postby retrieverbeliever » January 20th, 2011, 9:17 pm

I am working with the Custom Registration Fields. I have created a multi-option checkboxes field. I want to fix up the CSS as it is not aligned correctly by default. I have checked it with default WP theme and checkboxes are not aligned correctly there either. So...

I want to have two classes - "input" and "label" each with its own CSS styling. In the CSS Styles area of the Edit Registration Filed dialog (It has the following: Example: my-style-1 my-style-2), it is not clear how I determine which CSS is assigned to "input" and which is assigned to "label".

My question is how do I create CSS for each of my custom classes?

Follow-up questions:
- which CSS file is this information stored?
- where is the registration form stored?

Thanks in advance!

Toni
User avatar
retrieverbeliever
Registered User
Registered User
 
Posts: 12
Joined: December 1, 2010

Re: How do I create CSS for each Custom Class in Editing Reg

Postby cexpert » September 12th, 2011, 10:29 am

We need the very same question answered.
Has anybody found the solution to this problem?
User avatar
cexpert
Registered User
Registered User
 
Posts: 3
Joined: September 11, 2011

Re: How do I create CSS for each Custom Class in Editing Reg

Postby Cristián Lávaque » September 16th, 2011, 4:31 pm

You can use the ID for the input as a selector to style it from the theme's CSS file. For the label, if it doesn't have an ID, you can use the sibling selector. http://css-tricks.com/5514-child-and-sibling-selectors/

You can post a link to the form so I take a look and suggest something.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: How do I create CSS for each Custom Class in Editing Reg

Postby banta » November 17th, 2011, 9:35 am

Hi Christián,

I have a multi-option Checkbox custom registration field (which contains 36 checkboxes). I would like to arrange the checkboxes into three columns. I don't imagine that it would be very easy to list these top to bottom, left to right. So I am hoping to set the width of the label to a static value which would force the checkboxes/labels to line up under each other as they wrap across the screen (if you know what I mean).

I have been looking at this issue, however I can't override the styles in question because of the style attribute within the label tags:
Code: Select all
<input id="ws-plugin--s2member-custom-reg-field-skillset-0" class="ws-plugin--s2member-custom-reg-field skillset" type="checkbox" tabindex="76" aria-required="true" name="ws_plugin__s2member_custom_reg_field_skillset[]" value="Coding">
<label class="ws-plugin--s2member-custom-reg-field-op-l" style="display:inline !important; margin:0 !important;" for="ws-plugin--s2member-custom-reg-field-skillset-0">Coding</label>


I have tried overriding this in many different ways, but I have not had any luck. FYI: At the moment, I am using a plugin called "Custom Login" to insert CSS on the login page.

Do you have any suggestions as to how I could override (or completely remove) the inbuilt style attribute created by S2Member?

Thank you.

Denis
User avatar
banta
Registered User
Registered User
 
Posts: 10
Joined: August 8, 2011

Re: How do I create CSS for each Custom Class in Editing Reg

Postby Cristián Lávaque » November 19th, 2011, 3:01 am

I see... Have you tried if this does what you need?

FAQs wrote:How can I prevent s2Member Pro from loading it's default CSS?

You can create this directory and file: /wp-content/mu-plugins/s2-hacks.php

Code: Select all
<?php
add_action ("ws_plugin__s2member_after_loaded", "remove_s2_pro_css");
function remove_s2_pro_css ()
    {
        remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_css_js::css");
    }
?>


Or, you could remove only specific action Hooks; based on Payment Gateway.

Code: Select all
<?php
add_action ("ws_plugin__s2member_after_loaded", "remove_s2_pro_css");
function remove_s2_pro_css ()
    {
        remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_alipay_css_js::alipay_css");
        remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_authnet_css_js::authnet_css");
        remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_ccbill_css_js::ccbill_css");
        remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_clickbank_css_js::clickbank_css");
        remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_google_css_js::google_css");
        remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_paypal_css_js::paypal_css");
    }
?>
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: How do I create CSS for each Custom Class in Editing Reg

Postby banta » November 21st, 2011, 8:51 am

Hi Christian,

Thanks for your reply - apologies, I should've mentioned that I was not using the Pro version as I was still evaluating the plugin. However I am very happy with it, so I just purchased a license for the Pro version.

I have setup the s2-hacks.php as per the FAQ & your post. However, the styles are still present in the label tag. You can see the issue here (see any of the checkboxes towards the bottom of the page):
http://etpi.ie/wp-login.php?action=register

Any further suggestions?

Thank you.
User avatar
banta
Registered User
Registered User
 
Posts: 10
Joined: August 8, 2011

Re: How do I create CSS for each Custom Class in Editing Reg

Postby Cristián Lávaque » November 25th, 2011, 2:50 am

Thank you for your support! I'm glad you're happy with s2Member. :)

I can see your problem. I'll ask Jason what could be done about that. Thanks for your patience.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: How do I create CSS for each Custom Class in Editing Reg

Postby banta » November 25th, 2011, 8:31 am

Thanks Cristián. Looking forward to finding a resolution to this.
User avatar
banta
Registered User
Registered User
 
Posts: 10
Joined: August 8, 2011

Re: How do I create CSS for each Custom Class in Editing Reg

Postby Jason Caldwell » November 30th, 2011, 4:07 pm

Thanks for the heads up on this thread.

By default, all of those checkboxes are displayed inline with their labels. With that many checkboxes, you might want to consider using a multi-option select menu instead; or, perhaps using some custom CSS and/or JavaScript to manipulate the display of those checkboxes. Perhaps something like this.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_action 
("login_head", "my_custom_css");
function my_custom_css ()
    {
        echo '<style type="text/css">';
        echo 'label.ws-plugin--s2member-custom-reg-field-op-l:after { content:""; display:block; clear:both; }';
        echo '</style>';
    }
?>
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: How do I create CSS for each Custom Class in Editing Reg

Postby banta » December 1st, 2011, 5:16 am

Jason,

Thank you very much for this - it is very useful. I am limited to checkboxes I'm afriad (requirement), but I was able to align them in using the code below (assigning a static label width and setting the display to inline-block).

Code: Select all
<?php
add_action ("login_head", "my_custom_css");
function my_custom_css ()
{
        echo '<style type="text/css">';
        echo 'label.ws-plugin--s2member-custom-reg-field-op-l:after { content:""; display:inline-block; clear:both; font-size:14px !important; color:#000000; width:140px;}';
        echo '</style>';
}   
?>


Thank you again, your help is very much appreciated.

Regards,
Denis
User avatar
banta
Registered User
Registered User
 
Posts: 10
Joined: August 8, 2011

Re: How do I create CSS for each Custom Class in Editing Reg

Postby Cristián Lávaque » December 3rd, 2011, 11:23 pm

Great! :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to Common Questions/Problems/Tips

Who is online

Users browsing this forum: No registered users and 2 guests

cron