...

View Full Version : Form is inside div in IE but not FF...



jonnybinthemix
05-04-2006, 12:57 AM
hi guys,

i have a simple form, and have placed it inside a div....


#form {
width: 70px;
height: 15px;
border: 1px dotted #87888d;
padding: .4em;
}


and the form...


<div id="form">

<form action="upload.php" method="post" ENCTYPE="multipart/form-data">
<b><i>Image:</i></b>
<input type="file" name="file" size="50">
<br>
<br>
<input type="submit" name="upload" value="Upload">
</form>
<br>
<br>
</div>

Problem is, the border doesent change size when i adjust it and in IE the border show up, but wont move when i try to centre it, and in FF the text "Image:" is the only thing in the border and the whole thing sits in a funny place!!

Any ideas guys!? :D :D

Thanks

Jon

_Aerospace_Eng_
05-04-2006, 02:09 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
#form {
width: 300px;
border: 1px dotted #87888d;
padding: .4em;
margin:auto;
text-align:center;
}
form {
margin:0;
padding:0;
}
#form .boldital {
font-weight:bold;
font-style:italic;
width:60px;
float:left;
clear:left;
display:block;
text-align:left;
}
#form input {
width:240px;
float:right;
clear:right;
}
#form input#upload {
float:none;
width:auto;
display:block;
clear:both;
margin:auto;
}
</style>
</head>

<body>
<form action="upload.php" method="post" enctype="multipart/form-data">
<div id="form">
<label class="boldital" for="file">Image:</label>
<input type="file" name="file" id="file">
<br>
<br>
<input type="submit" id="upload" name="upload" value="Upload">
</div>
</form>
</body>
</html>

jonnybinthemix
05-04-2006, 05:53 AM
brilliant, that works great :D

thanks alot.

Jon

snake_eyes
07-17-2007, 05:39 PM
Hello,

Dear brother, I have the same problem but I forced to be the form inside the div because the div is the main way to show all the forms, and on each form have different action.

any idea please?

Cheers



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum