Make WordPress Core

Opened 18 years ago

Closed 17 years ago

Last modified 7 years ago

#4405 closed defect (bug) (invalid)

fieldset in wp-admin.css set all input to width 100% this also happens for radio and checkbox

Reported by: cimmo's profile Cimmo Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2
Component: UI Keywords:
Focuses: Cc:

Description

With the hook that let you add new fields into user profile you can also add checkbox and radio, however checkbox and radio are displayed wrong (too large) because this part of the css:

line 1087:
#your-profile fieldset input {

width: 100%;
font-size: 20px;
padding: 2px;

}

a possible solution is to set #your-profile fieldset input[type="text"] and input[type="password"] however this css hack is not correctly read by IE 6.0, so another possible solution can be to set a class that has these properties and then add or not to the inputs.

See screenshots for behaviour in WordPress 2.2 under Firefox 2.0.0.4

Attachments (4)

radio.png (342 bytes) - added by Cimmo 18 years ago.
radio button in firefox under own profile
checkbox.png (963 bytes) - added by Cimmo 18 years ago.
checkbox on firefox under user profile
ie7_checkbox_width_auto.png (2.0 KB) - added by Cimmo 18 years ago.
checkbox with width=auto override, has a small rectangle as border
ie7_radio_width_auto.png (2.5 KB) - added by Cimmo 18 years ago.
radio with width=auto override, has a small rectangle as border

Download all attachments as: .zip

Change History (12)

@Cimmo
18 years ago

radio button in firefox under own profile

@Cimmo
18 years ago

checkbox on firefox under user profile

#1 @Otto42
18 years ago

Which hook are you referring to? And if you can insert checkbox and/or radio, why not simply override the style's for those locally by adding a style="width:auto" to those tags?

#2 follow-up: @Cimmo
18 years ago

I have just overrided with auto, but have some side effects:

1) as said in IE 6.0 this doesn't work at all, because [type="radio"] is not recognized
2) some browsers with auto set correctly width, but they still draw a small rectangle around the radio or checkbox, this is the case in Opera and IE 7.0, see new sceenshot

@Cimmo
18 years ago

checkbox with width=auto override, has a small rectangle as border

@Cimmo
18 years ago

radio with width=auto override, has a small rectangle as border

#3 @Cimmo
18 years ago

forgot to say that hooks to add new fields in profile are:

1) show_user_profile 2) edit_user_profile

#4 in reply to: ↑ 2 ; follow-up: @Otto42
18 years ago

Replying to Cimmo:

I have just overrided with auto, but have some side effects:

1) as said in IE 6.0 this doesn't work at all, because [type="radio"] is not recognized

Why would you need to use [type="radio"]? I meant why not override it in the actual tag itself, not in the CSS file.

function prof_stuff()
{
echo '<input type="radio" name="whatever" style="width:auto;" /> Whatever';
}
add_action('edit_user_profile','prof_stuff');

2) some browsers with auto set correctly width, but they still draw a small rectangle around the radio or checkbox, this is the case in Opera and IE 7.0, see new sceenshot

style="border:0" , perhaps? I don't have all the answers, I'm just not understanding why you can't apply your necessary styles without modifying the CSS file? Okay, it's not the *best* way to go, but local styles always override CSS applied styles.

#5 in reply to: ↑ 4 @Cimmo
18 years ago

Replying to Otto42:

echo '<input type="radio" name="whatever" style="width:auto;" /> Whatever';

well sometimes easier things are the best, of course it works!

style="border:0" , perhaps? I don't have all the answers, I'm just not understanding why you can't apply your necessary styles without modifying the CSS file? Okay, it's not the *best* way to go, but local styles always override CSS applied styles.

ok I'm not a css expert so you are right again also with border:0
anyway in my opinion should be fixed anyway, first time WordPress will add into fieldset in user profile a radio or checkbox should fix this bug :)

thanx for your tips

#6 @rob1n
18 years ago

  • Milestone changed from 2.2.1 to 2.3 (trunk)

#7 @DD32
17 years ago

  • Component changed from Administration to UI
  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from new to closed

I'm going to assume this has probably been dealt with in the UI makeovers of either 2.5 or 2.7

This ticket was mentioned in Slack in #core-privacy by garrett-eclipse. View the logs.


7 years ago

Note: See TracTickets for help on using tickets.