Profile textarea width (cols) is overrided by default prosilver style

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
User avatar
Kami-sama
Registered User
Posts: 137
Joined: Sat May 26, 2018 3:07 pm

Profile textarea width (cols) is overrided by default prosilver style

Post by Kami-sama »

Hello!

My forum style is based on prosilver (I have made adjustments to it)
I created a custom profile field of textarea type. I set width of the field for example 50 cols.
In the profile cols value is overriden by:

Code: Select all

/*forms.css*/
textarea.inputbox {
    width: 85%;
}
dd textarea {
    width: 85%;
}
textarea {
    font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
    width: 60%;
    padding: 2px;
    font-size: 1em;
    line-height: 1.4em;
}
What is the best way to fix it without affecting other text areas?
User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 1065
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: Profile textarea width (cols) is overrided by default prosilver style

Post by Hanakin »

not sure why you need it to be a different size than the rest? but generally speaking, the cols attribute is not preferred over css. add your own custom class and style it that way.
User avatar
Kami-sama
Registered User
Posts: 137
Joined: Sat May 26, 2018 3:07 pm

Re: Profile textarea width (cols) is overrided by default prosilver style

Post by Kami-sama »

Hanakin wrote: Tue Jun 12, 2018 2:37 am not sure why you need it to be a different size than the rest? but generally speaking, the cols attribute is not preferred over css. add your own custom class and style it that way.
Well my user panel is more narrow than for example topic page, so textarea is too long and gets missaligned in profile page.

If there is an option to set profile field width, it should actually work. Don't you think?
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Profile textarea width (cols) is overrided by default prosilver style

Post by david63 »

Kami-sama wrote: Tue Jun 12, 2018 10:52 am If there is an option to set profile field width, it should actually work. Don't you think?
Report it in the Bug Tracker
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Kami-sama
Registered User
Posts: 137
Joined: Sat May 26, 2018 3:07 pm

Re: Profile textarea width (cols) is overrided by default prosilver style

Post by Kami-sama »

Thanks. I have created a bug for this: https://tracker.phpbb.com/browse/PHPBB3-15690
Hm, maybe will have to adjust the UCP template or smth to have it resolved for now.
Not sure what would be the best...
User avatar
Sniper_E
Registered User
Posts: 1126
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: Profile textarea width (cols) is overrided by default prosilver style

Post by Sniper_E »

If you want to effect just that created custom profile field of textarea then you could wrap your custom code with a
<div id="cpftextarea">Your custom code</div>
Or use <span there if <div want work.
Then create your classes for it.

Code: Select all

/*forms.css*/
#cpftextarea textarea.inputbox {
    width: 85%;
}
#cpftextarea dd textarea {
    width: 85%;
}
#cpftextarea textarea {
    font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
    width: 60%;
    padding: 2px;
    font-size: 1em;
    line-height: 1.4em;
}
Then only that textarea css will change.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Kami-sama
Registered User
Posts: 137
Joined: Sat May 26, 2018 3:07 pm

Re: Profile textarea width (cols) is overrided by default prosilver style

Post by Kami-sama »

Actually what I did was, I added this part with my custom width:

Code: Select all

#ucp textarea.inputbox {
    max-width: 58%;
}
with #ucp I make sure it is applied only in UCP section :)
Seamed like the least harmful solve.
Post Reply

Return to “[3.2.x] Styles Support & Discussion”