Solved

netscape, ie, and input boxes

Posted on 2003-10-21
4
282 Views
Last Modified: 2013-12-24
netscape seems to display vastly different sizes for input boxes than ie does in forms - is there anything to do about this (such as maybe through stylesheets) so that I don't have to do browser detection everytime i want to make a form

thanks,

justin
0
Comment
Question by:newstandard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 150 total points
ID: 9591689
a few options:

STYLE="width:150px;" SIZE=150

or

http://www.faqts.com/knowledge_base/view.phtml/aid/14184/fid/337

CJ
0
 
LVL 17

Assisted Solution

by:anandkp
anandkp earned 50 total points
ID: 9592441
Use width attribute in style sheets for IE
& use "Size" attribute to netscape

eg : STYLE="width:100px;" SIZE=20

that shld be it -

PS : they both cannot be same ... as 150 wld be tooooooooo big for netscape

Hope that helps

K'Rgds
Anand
0
 
LVL 19

Assisted Solution

by:cheekycj
cheekycj earned 150 total points
ID: 9592486
I used 150 as an example.. Any size can be used there :-)

But in essense STYLE and SIZE combination is the solution I was getting at.

CJ
0
 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 50 total points
ID: 9781855
I would recommend NOT using the SIZE attribute in them, instead use CSS and a stylesheet to define the width of the element in pixels or do it in the style of the element.

In general I prefer to have a class that defines the width.

You can either define a named class and then apply it using the class attribute like this :

(in the stylesheet)
.myclassname {width: 200px;}

<input type="text" name="test" class="myclassname">

Or you can have the stylesheet apply the class by default to inputs like this :

(in the stylesheet)
input { width:200px;}


However, I have found that it works more reliably if you use the first option and name the class as some browsers have trouble with applying a default style to certain types of form elements.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question