|
| |
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: online
|
IE bug? - 5/2/2006 16:46:35
Seems like I read somewhere that this is a bug, but can't find it. I am trying to enclose a form inside a div. However, I am getting extra space at the bottom of the div, like a line break or something. Here is the code for the relevant part:
<div style="width:500px;margin:0 auto;border:2px solid #000000;background-color:lightblue;padding:5px;">
<form name="form1" method="get" action="results.htm" onsubmit="return getData();">
<label for="t1">Form:</label>
<select name="returnType" id="returnType">
<option selected>Select One</option>
<option>A</option>
<option>B</option>
<option>C</option>
<option>D</option>
<option>E</option>
<option>F</option>
<option>G</option>
</select>
</p>
<p>
<label for="inputCode">2-digit Input Code (To return all codes for the chosen form(s), leave blank):</label>
<input type="text" name="inputCode" id="inputCode" size="2" maxlength="2">
<input type="hidden" name="theRow" id="theRow">
<input type="hidden" name="subRow" id="subRow">
<br>
<br>
<input type="submit" name="Submit" value="Submit" id="Submit">
</form>
</div>
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
Kitka
Posts: 2520 Joined: 1/31/2002 From: Australia Status: offline
|
RE: IE bug? - 5/2/2006 17:17:39
That is easily fixed by adding a style to the Form code: <form name="form1" method="get" action="results.htm" onsubmit="return getData();" style="display:inline;">
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: online
|
RE: IE bug? - 5/2/2006 18:34:28
Thanks, that does seem to fix it. Curiously, however, the spacing remains in FF with or without adding the display attribute.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
Kitka
Posts: 2520 Joined: 1/31/2002 From: Australia Status: offline
|
RE: IE bug? - 5/2/2006 19:17:26
quote:
Curiously, however, the spacing remains in FF with or without adding the display attribute. Urgh, you only mentioned a problem with IE so I didn't look at it in FF. Try changing the code for the last para to this: <p style="margin-bottom:0;padding-bottom:0;">
<label for="inputCode">2-digit Input Code (To return all codes for the chosen form(s), leave blank):</label>
<input type="text" name="inputCode" id="inputCode" size="2" maxlength="2">
<input type="hidden" name="theRow" id="theRow">
<input type="hidden" name="subRow" id="subRow">
<br>
<br>
<input type="submit" name="Submit" value="Submit" id="Submit"></p>
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: online
|
RE: IE bug? - 5/2/2006 20:17:25
quote:
Urgh, you only mentioned a problem with IE so I didn't look at it in FF. In reality, the page will never be viewed in FF, but since I was at home I decided to check it out of curiosity. Your fix worked. Thanks. I guess I still don't understand what causes that spacing to be there. The top, left and right are all as they should be.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
Kitka
Posts: 2520 Joined: 1/31/2002 From: Australia Status: offline
|
RE: IE bug? - 5/2/2006 20:34:11
quote:
I guess I still don't understand what causes that spacing to be there. A paragraph is a block level element, which is assigned a bottom margin by default. For some reason, IE ignores the margin in some circumstances. Whereas Firefox and Opera don't, which is the correct thing to do. Some people, when they are building their external CSS, will start by zeroing margins and padding on all block level elements, and then add them back in places where it is needed. That can save some hassles, but I prefer to zero them only where necessary.
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: online
|
RE: IE bug? - 5/2/2006 21:18:44
Makes sense. Thanks Kitka.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|