Advertisement

02.12.2008 at 02:13AM PST, ID: 23155626
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Firefox ignore the CSS text-align property when using min-width property on input button

Tags: CSS, Firefox
Hello Experts

I have a style used with input button aims to give it minimum width:
.FormButton {
      BACKGROUND-COLOR: #E4E4E4;
      FONT-FAMILY: Arial;
      FONT-SIZE: 8pt;
      FONT-WEIGHT: normal;
      WIDTH: 100px;
      OVERFLOW: visible;
}

It works will on IE6+, but it does not work with FF if the text is long it will be truncated.
I fix this by adding the min-width property to the style as this:
.FormButton {
      BACKGROUND-COLOR: #E4E4E4;
      FONT-FAMILY: Arial;
      FONT-SIZE: 8pt;
      FONT-WEIGHT: normal;
      *WIDTH: 100px;
      MIN-WIDTH: 100px;
      OVERFLOW: visible;
      TEXT-ALIGN: center;
}

It fix the issue of long text truncating, but it add a problem of short text alignment.
text-align:center does not fix the problem.

You can see the sample code and the screen shot attached to figure the issue

Is there any CSS solution to the short text alignment problem? I need it to be centered.
Thanks
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
<html>
	<head>
		<style type="text/css">
			.FormButton {
				BACKGROUND-COLOR: #E4E4E4;
				FONT-FAMILY: Arial;
				FONT-SIZE: 8pt;
				FONT-WEIGHT: normal;
				*WIDTH: 100px;
				MIN-WIDTH: 100px;
				OVERFLOW: visible;
				TEXT-ALIGN:CENTER;
			}
			
			.FormButtonOld {
				BACKGROUND-COLOR: #E4E4E4;
				FONT-FAMILY: Arial;
				FONT-SIZE: 8pt;
				FONT-WEIGHT: normal;
				WIDTH: 100px;
				OVERFLOW: visible;
			}
		</style>
	</head>
	<body>
		<h3> Min-Width Used</h3>
		<input type="button" value="Short" class="FormButton" /><br>
		<input type="button" value="Long Text Button Should Not truncated" class="FormButton" />
		
		<h3> Min-Width Not Used</h3>
		<input type="button" value="Short" class="FormButtonOld" /><br>
		<input type="button" value="Long Text Button Should Not truncated" class="FormButtonOld" />
	</body>
</html>
Attachments:
null
Screen shots from IE7 and FF2
Screen shots from IE7 and FF2
 
Start your free trial to view this solution
Question Stats
Zone: Web Development
Question Asked By: aidinet
Solution Provided By: xberry
Participating Experts: 2
Solution Grade: B
Views: 123
Translate:
Loading Advertisement...
02.12.2008 at 04:13AM PST, ID: 20874108

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.12.2008 at 10:45AM PST, ID: 20877472

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.14.2008 at 02:06AM PST, ID: 20892156

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.14.2008 at 11:08AM PST, ID: 20896144

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628