I have four buttons in an HTML form.
Here is the HTML:

<tr>	
				<td>
					<div class="fileinputs">
					<input type="submit" name="submit" class="submit" />
					</div>
					<div class="fileinputs">
							<input type="file" class="file" name="uploadedfile" />
						<div class="fakefile">
								<img src="uf_btt.png" />
						</div>
					</div>
					<div class="fileinputs">	
					<input type="reset" class="reset" />
					</div>
					<div class="fileinputs">
					<input type="button" class="print" onclick="window.print()" /> 
					</div>
</td>
</tr>

Here is the CSS:

.submit {
	background: transparent;
	background-image: url(submit_btt.png);
	border: none;
	padding: 0;
	margin: 0;
	text-indent: -9999px;
}

.print {
	background: transparent;
	background-image: url(print_btt.png);
	border: none;
	padding: 0;
	margin: 0;
	text-indent: -9999px;
}

.reset {
	background: transparent;
	background-image: url(reset_btt.png);
	border: none;
	padding: 0;
	margin: 0;
	text-indent: -9999px;
}

input[type=submit]
{
    width: 119px;
	height: 47px;
}

input[type=button]
{
    width: 119px;
	height: 47px;
}

input[type=reset]
{
    width: 119px;
	height: 47px;
}

input[type=file]
{
    width: 119px;
	height: 47px;
}

div.fileinputs {
	position: relative;
	float: left;
}

div.fakefile {
	position: absolute;
	top: 0px;
	left: 0px;
	z-index: 1;
}

input.file {
	position: relative;
	text-align: right;
	-moz-opacity:0 ;
	filter:alpha(opacity: 0);
	opacity: 0;
	z-index: 2;
}

It works fine in all browsers, and only in IE you can see just one button ('file') on the screen instead of four.
Any insight, please?

Thank you!

Recommended Answers

All 3 Replies

Do you have a doc type set? Meaning do you have something like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

as the first line of your html file? When I added it to my file I saw all three buttons.

Use 'class' or 'id' instead of 'attribute' (input[type]). This may ignore in some of IE version.

Do you have a doc type set? Meaning do you have something like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

as the first line of your html file? When I added it to my file I saw all three buttons.

Sorry for the delayed response - the notification of this message hasn't come to my email.

Yes, I do have it all set in my file.
The resolution of the problem is this:
http://www.daniweb.com/forums/post1291891.html#post1291891

It's just IE. It doesn't understand things like this:
input[type=submit]

But thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.