Skip Navigation

[Resolved] Login form no responsive

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 2 voices.

Last updated by Christian Cox 6 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#607703

Hello,
I enclosed the Login form in a framework: hidden link
Well done, only when I see the page with the smartphone, you can see the fields of the form very compact.

(login page) I incorporated it like this:

<div id="form-login">
<h2>Accedi a Riplove</h2>
<p>[wpv-login-form redirect_url="<em><u>hidden link</u></em>" redirect_url_fail="<em><u>hidden link</u></em>"]</p>
<p><a href="<em><u>hidden link</u></em>">Password dimenticata ?</a> - <a href="<em><u>hidden link</u></em>">Registrati</a></p>
</div>

I then added this Css code in "Css and JS of Layout"

.input[type=text]  {
    width: 50%; 
}

.input[type=password]  {
    width: 50%;
     
}


#form-login {
    border: 1px solid ;  
    border-color: #eee6db;
    border-radius: 5px;
    background-color: #fcf7f0;
    padding-left: 140px;
    padding-top: 30px;
    padding-bottom: 20px;
  
}

where am I wrong?

#607780
Screen Shot 2018-01-18 at 3.13.30 PM.png

The padding-left style on #form-login has pushed your form elements over as shown in the attached screenshot. You could remove it, or add a media query that modifies it at smaller resolutions. You probably need to change the input widths as well:

@media screen and (max-width:500px){
  #form-login {
    padding-left:30px;
  }
  .input[type=text]  {
    width: 90%; 
  }
  .input[type=password]  {
    width: 90%;    
  }
}

Modify the max-width, padding-left, and width values as needed.

If you want to write your own responsive CSS, you will benefit from learning how to use media queries:
hidden link

#607904

it works very well for the pages, but it does not work in the CRED module: hidden link
it does not change the length of the fields

#608346

When you add CSS to a Layout, it only applies to that Layout. So if your CRED login form has a different Layout, the code will not be used.
- Add the CSS to both Layouts CSS panels.
- Update the CSS selectors to work with the CRED form fields. The current CSS uses the class "input" but the CRED form fields do not have this class, so you must add it to the fields or change the code.

...
.input[type=text]  {
...
#608516

"The current CSS uses the class "input" but the CRED form fields do not have this class"

ok, can you explain how to find the CRED module class?

thank you

#608657

You can inspect the form field in the browser's developer tools to find any classes that are already applied, or you can add a custom class to any cred_field shortcode using the "class" attribute. For example, this code will add the CSS class "some-custom-class" to a CRED form field with the slug "mobile":

[cred_field field="mobile" post="agent" value="555-1234" class="some-custom-class" ]

Documentation for options you can modify in a CRED field shortcode is available here:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field

#610303

OK thanks . I'll do some tests these days and I'll tell you

#610487

That sounds good. I will mark this ticket as pending an update from you. There is no need to reply right now. The ticket will remain open for 30 days.

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.