Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Make HTML forms display pretty

Make HTML forms display pretty
Thread Tools
Senior User
Join Date: Feb 2000
Location: Webster, NY, USA
Status: Offline
Reply With Quote
Jul 3, 2003, 08:52 AM
 
I am having a issue with some HTML forms I am creating.

I have a form that uses both Text input as well as TextArea boxes.

I want to make the width of each of these the same, for beauty's sake.

The only way I know to adjust the width of an <input type="text"> element is with the size attribute (eg <input type="text" name="name" size="80">

With the textarea, the only way know is to adjust the cols attribute <textarea name="name" cols="80">

Now, I thought I had them looking pretty even when testing them in my default browser (Camino). Then I launched Safari and noted that the input field was significantly longer than the textarea.

I launched IE 6 on my PC at work, and the textarea was slightly longer than the input field (the opposite of Safari).

I do not have custom style sheets running in any pf my browsers. I was wondering if someone out there can help me to make everything the same width or if I am pretty much stuck doing with different browsers idea of things.

Other info, the form elements are inside a table, 2 columns by 6 rows). I have tried applying css to the <TD> tag (<TD class="classname">, while this does set the fonts within the input and textarea fields the way I want them, it does not help the width of the field, and different browsers still do thier own thing.

Advice appreciated.

Peace,

O
B unce!
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jul 3, 2003, 11:05 AM
 
</textarea>
just thought i'd help a little
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jul 3, 2003, 11:09 AM
 
in the future either use ['s or close your tags.

-------- the rest of his post, which is within the text area above ----
Now, I thought I had them looking pretty even when testing them in my default browser (Camino). Then I launched Safari and noted that the input field was significantly longer than the textarea.

I launched IE 6 on my PC at work, and the textarea was slightly longer than the input field (the opposite of Safari).

I do not have custom style sheets running in any pf my browsers. I was wondering if someone out there can help me to make everything the same width or if I am pretty much stuck doing with different browsers idea of things.

Other info, the form elements are inside a table, 2 columns by 6 rows). I have tried applying css to the [TD] tag ([TD class="classname"], while this does set the fonts within the input and textarea fields the way I want them, it does not help the width of the field, and different browsers still do thier own thing.

Advice appreciated,

Peace,

O
B unce!
--- end message within the above text area ---


--will
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jul 3, 2003, 11:12 AM
 
and in response:

you can use css to control the width:

[input type='text' style='width: 50%']

and that will make the text box half the width of the window.

--will
     
Senior User
Join Date: Feb 2000
Location: Webster, NY, USA
Status: Offline
Reply With Quote
Jul 3, 2003, 06:04 PM
 
Sorry about the tags on my original post.

Thank you for the info! That worked!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:46 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2