PDA

View Full Version : FYI: Getting the same textarea display in all browsers



samtha25
Fri 4th Jan '02, 4:05am
I thought I'd past along this discovery. If you prefer fixed space and larger fonts for composition boxes, browsers, including N4 and IE5, will size the boxes the same if you use a style class on the TD that contains the message box rather than rely on the textarea declaration. All you need to do is add a simple class to the style in headinclude, like:

.compbox { font-family: "courier new", courier, monospace }

then find the TDs in the various posting tempates that contain the textarea and add the class to the TD, like so:

<td class="compbox">

You can then set the width for textareas in the admin panel to the same value for each browser family - or hand-code the width in the template. The size of the font will be determined by the default fixed font users have set in their browsers, which gives them more control over the sizing to the font to their platforms.

Nikhil Nayak
Thu 10th Jan '02, 1:37pm
just out of curiosity ... how many templates do you have to edit?

samtha25
Thu 10th Jan '02, 5:44pm
newthread
newreply
priv_sendprivmsg
priv_sendtobuddies
priv_forwardmultiple
sendtofriend
mailform
reportbadpost
modifyprofile
calendar_enterevent
registercoppa
registeradult

Those are the templates that use textarea. Single-line text input fields are controlled by the vB class "bginput". Since the same class is used for form buttons, if you change bginput to a fixed font, the form buttons get pretty large, although not too bad if you also set a font-size.

What I actually did for our board was to create a new class for form buttons and use bginput for all textareas and single line inputs. That is a lot of templates to change, but I'm pleased with the results. All text input fields are now nice and neat, size the same in all browsers, and are amenable to the users settings.

nuno
Mon 21st Jan '02, 10:18pm
will this work with Konqueror?

samtha25
Tue 22nd Jan '02, 3:18pm
No idea.

nuno
Tue 22nd Jan '02, 6:06pm
i c
not all browsers then :rolleyes:

samtha25
Tue 22nd Jan '02, 8:25pm
You're right. All windows browsers - afaik. I expect it would work in Konquerer too, as it's a throwback to early CSS.