Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-04-2006, 12:57 AM   PM User | #1
jonnybinthemix
Regular Coder

 
Join Date: May 2006
Location: Bristol, UK
Posts: 147
Thanks: 6
Thanked 2 Times in 2 Posts
jonnybinthemix will become famous soon enough
Form is inside div in IE but not FF...

hi guys,

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

Code:
#form {
	width: 70px;
	height: 15px;
	border: 1px dotted #87888d;
	padding: .4em;
}
and the form...
Code:
<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!?

Thanks

Jon
jonnybinthemix is offline   Reply With Quote
Old 05-04-2006, 02:09 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Code:
<!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>
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-04-2006, 05:53 AM   PM User | #3
jonnybinthemix
Regular Coder

 
Join Date: May 2006
Location: Bristol, UK
Posts: 147
Thanks: 6
Thanked 2 Times in 2 Posts
jonnybinthemix will become famous soon enough
brilliant, that works great

thanks alot.

Jon
jonnybinthemix is offline   Reply With Quote
Old 07-17-2007, 05:39 PM   PM User | #4
snake_eyes
New Coder

 
Join Date: Mar 2007
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
snake_eyes is an unknown quantity at this point
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
snake_eyes is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:02 PM.


Advertisement
Log in to turn off these ads.