Add CSS Styling to s2member Pro Login Widget

Posted on 2012-08-24
Last Modified: 2012-08-25
I'm using the s2member Pro Login Widget on my wordpress page but my page is full width and the login fields stretch across the content area.  I'm displaying the widget using the following php code: <?php echo s2member_pro_login_widget(); ?>

Here is my url to my page:

I want to apply css to the form (and fields) so that the fields (and Submit button) don't stretch across like it's doing.  What would I need to do to fix it and also tuck the form under the text on the left side.  I also don't want to use tables but divs and css techniques.

Any help is greatly appreciated, thanks.
Question by:COwebmaster
    LVL 107

    Accepted Solution

    Might want to check this...

    Here is the generated HTML (I added spacing for clarity).  The top div statement here is line 130 in the generated HTML.  You might try adding an explicit width to that style statement (perhaps try 400px for starters).

    <div style="padding-top:16px;">
    <h3>Membership Login</h3>
    <div class="ws-plugin--s2member-pro-login-widget">
    <form method="post" action="" class="ws-plugin--s2member-pro-login-widget-form">
    <div class="ws-plugin--s2member-pro-login-widget-username">
    <label for="ws-plugin--s2member-pro-login-widget-username">Username:</label><br />
    <input type="text" name="log" id="ws-plugin--s2member-pro-login-widget-username" title="Username" />
    <div class="ws-plugin--s2member-pro-login-widget-password">
    <label for="ws-plugin--s2member-pro-login-widget-password">Password:</label><br />
    <input type="password" name="pwd" id="ws-plugin--s2member-pro-login-widget-password" title="Password" />
    <div class="ws-plugin--s2member-pro-login-widget-lost-password">
    <a href="" tabindex="-1">signup now</a> | <a href="" tabindex="-1">forgot password?</a>
    <div class="ws-plugin--s2member-pro-login-widget-remember-me">
    <label><input type="checkbox" name="rememberme" value="forever" />Remember Me</label>
    <div class="ws-plugin--s2member-pro-login-widget-submit">
    <input type="submit" value="Log Me In" />
    <div class="ws-plugin--s2member-pro-login-widget-code">
    <div style="clear:both;"></div>

    Open in new window


    Author Comment

    good point.  Thanks Ray.
    LVL 107

    Expert Comment

    by:Ray Paseur
    Thanks for the points! ~Ray

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now