Plugin CSS file screws display on different browsers
-
Hi all,
It seems that the CSS of wp-members screws up its display on different browsers.
When registering a new user, using Chrome (on a Mac) there is not enough space visible to enter anything.
In Firefox it works fine.I had a friend look at this. Here’s his answer:
***
The problem stems from the fact that the designer decided to set the height of the input box and add internal padding to it.The plugin has its own css file. Here
https://internetbusinessquestions.com/wp-content/plugins/wp-members/css/wp-members-2012.css
He has added 10 pixels of internal padding on line 173.
Line 173
#wpmem_reg .div_textarea textarea, #wpmem_reg .textbox, #wpmem_login .textbox, #wpmem_reg .username, #wpmem_login .username, #wpmem_reg .password, #wpmem_login .password {
display: block;
font: inherit;
padding: 10px;
width: 95%;
}He then sets the height of the input box to 24 pixels.
In Chrome, this means that 20 of the 24 pixels in the height are used up by the padding. So we only see 4 pixels worth of text.
In Firefox, they set the box to 24 pixels high AND add 10 pixels of padding at the top and the bottom. Which is why it works there.
Line 167
#wpmem_reg .dropdown, #wpmem_reg .textbox, #wpmem_login .textbox, #wpmem_reg .username, #wpmem_login .username, #wpmem_reg .password, #wpmem_login .password {
height: 24px;
}Simply removing the height, solves the problem.
BUT, it creates a new problem. They also specified a different height for the label ( the text on the left of the input box ) See below.
This causes a problem with firefox and stops the label and input box lining up correctly.
Again the solution is just remove the height declaration.
Line 113
#wpmem_reg label.text, #wpmem_reg label.checkbox, #wpmem_reg label.textarea, #wpmem_reg label.select, #wpmem_login label {
display: block;
float: left;
height: 26px;
width: 30%;
}Caveat: I have no idea what the implications of removing the height are on other browsers, mobile devices etc, bet generally it’s better just to let them figure out layouts in their own way. So removing something rigid like a height setting isn’t something so bad.
I think your best strategy for the moment is to remove the height declarations in the CSS as a short term fix, contact the plugin developer about the problem and then us their updated CSS as the long term fix.
***
So, if this is correct, could the developer look into this and provide a fix?
thanks
- The topic ‘Plugin CSS file screws display on different browsers’ is closed to new replies.