Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2006
    Location
    Bristol, UK
    Posts
    147
    Thanks
    6
    Thanked 2 Times in 2 Posts

    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

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||

  • #3
    Regular Coder
    Join Date
    May 2006
    Location
    Bristol, UK
    Posts
    147
    Thanks
    6
    Thanked 2 Times in 2 Posts
    brilliant, that works great

    thanks alot.

    Jon

  • #4
    New Coder
    Join Date
    Mar 2007
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •