?
Solved

Standardizing button widths in "pure" HTML

Posted on 2000-04-12
10
Medium Priority
?
164 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
ID: 2708278
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
ID: 2708388
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
ID: 2708431
And should the STYLE tags be in the HEAD tags of the page? or just before the BODY?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
davlun20080 earned 300 total points
ID: 2709125
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
ID: 2709142
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
 
LVL 3

Expert Comment

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

Author Comment

by:kisrael
ID: 2709287
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
ID: 2709451
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
ID: 2709568
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
ID: 2711282
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Suggested Courses

807 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