Solved

Standardizing button widths in "pure" HTML

Posted on 2000-04-12
10
155 Views
Last Modified: 2010-04-09
I know this falls outside what HTML "should" be doing, but is there any way in MS-IE to get standard widths for INPUT SUBMITs? In Netscape I'd have two options: use a WIDTH parameter, or set the font to a fixed width font and pad the VALUE with spaces.  Neither of these techniques seem to work in IE.  Is there at tiny smatterign of CSS I could use, or some little trick?
0
Comment
Question by:kisrael
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 1

Expert Comment

by:ManoloMA
Comment Utility
You can create a style

<STYLE>
..button{
  WIDTH: 80px;
  FONT-FAMILY: Arial;
  FONT-SIZE: 8pt
}
..text{
  WIDTH: 80px;
  FONT-FAMILY: Courier New;
  FONT-SIZE: 8pt;
}
</STYLE>

<BODY>

<INPUT type="text" class="text">
<INPUT type="submit" class="button">
0
 

Author Comment

by:kisrael
Comment Utility
Cool, this may be just what I'm looking for.
It seems like Netscape ignores it, is that correct?

Also, what does the .. before the class names?
0
 

Author Comment

by:kisrael
Comment Utility
And should the STYLE tags be in the HEAD tags of the page? or just before the BODY?
0
 
LVL 3

Accepted Solution

by:
davlun20080 earned 100 total points
Comment Utility
You can actually specify the style="width: 200px" within the <input> tag, right next to the size = "" command.  If there is a style attribute in the input tag, IE will ignore the size="" and NS will ignore the style portion.  For font class attributes, you can wrap the input tag in a span with a class statement for NS and place that same class in the input tag as well for IE.

davlun
0
 

Author Comment

by:kisrael
Comment Utility
Thanks, that's a cleaner version of the above.

ANd now the $24.00 question: is there a version that also work with 4.7 Netscape for the Mac?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Expert Comment

by:davlun20080
Comment Utility
Not sure on the mac end of things... Have you tried it and it doesn't work?
0
 

Author Comment

by:kisrael
Comment Utility
Someone on my team at work did, yeah-
it seems that it doesn't repect the WIDTH parameter.
0
 
LVL 3

Expert Comment

by:davlun20080
Comment Utility
NS should be picking up the size="" attribute and not the width statement.  It may be possible that the mac version is displaying differently as an extension of the way mac displays fonts, about 4 pt sizes smaller than IE.

Just as a test try increasing your font-size for the mac only, then see if they are nearly the same size.

davlun
0
 
LVL 1

Expert Comment

by:ManoloMA
Comment Utility
About your cuestion:

- Also, what does the .. before the class names?


It's a bug of this WEB.

I put one point here:
..

appears two points when the comment is submited.


About the class (I don't know if it works with NS), you can create one to all the INPUTS tags in the page, an put a class to the inputs you want to change:

<STYLE>
..button{ //There is only one '.'
  WIDTH: 80px;
  FONT-FAMILY: Arial;
  FONT-SIZE: 8pt
}
INPUT{
  WIDTH: 80px;
  FONT-FAMILY: Courier New;
  FONT-SIZE: 8pt;
}
</STYLE>

<BODY>

<INPUT type="text">
<INPUT type="submit" class="button">

0
 
LVL 2

Expert Comment

by:burntout
Comment Utility
Well This will work for sure, I don't know if you want to do it but you can use an image submit button, just draw a button in paintshop or do a screen capture of a real button and use it.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now