From: André Hänsel on
Hi group,

where does the gap between the img/input and the surrounding form come
from and how do I get rid of it?

http://kundenweb.creations.de/usenet/css/ie_form.htm (view in IE)

Regards,
André
From: Thomas 'PointedEars' Lahn on
André Hänsel wrote:

> where does the gap between the img/input and the surrounding form come
> from and how do I get rid of it?
>
> http://kundenweb.creations.de/usenet/css/ie_form.htm (view in IE)

There are many versions of Microsoft Internet Explorer, you should have been
more specific.

MSHTML 6.0 as of IE 6.0.2800.1106 does not support the `:first-child' pseudo
class for `input' elements in your document. Therefore, the rule set with
selector `#searchform input:first-child' is ignored. As a result, two 19px
wide `input' elements are displayed within a form of 161px width. The gap
you are observing is merely the part of the form's canvas not covered by
other elements.

A simple workaround is to give the first `input' element an ID, e.g.
`first', and modify the selector accordingly, e.g. `#searchform
input#first'.

You should not be serving XHTML to MSHTML-based and other XHTML-unsupportive
UAs, and you should not be using and serving XHTML as if it was just another
form of HTML.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
From: Bwig Zomberi on
Thomas 'PointedEars' Lahn wrote:
> There are many versions of Microsoft Internet Explorer, you should have been
> more specific.

You can use IE Tester
http://www.my-debugbar.com/wiki/IETester/HomePage


--
Bwig Zomberi
From: Bwig Zomberi on
André Hänsel wrote:
> Hi group,
>
> where does the gap between the img/input and the surrounding form come
> from and how do I get rid of it?
>
> http://kundenweb.creations.de/usenet/css/ie_form.htm (view in IE)


If you want no padding, specify a unit.
padding: 0px;

If you want to inherit padding, use no unit.
padding: 0;

Do not use selectors not supported by IE.





<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Home</title>
<style type="text/css">
body
{
background-color: #F9EBD7;
}
#searchform
{
border: 1px solid #6E6E6E;
padding: 0px;
width: 164px;
height: 19px;
}
#searchform input
{
border: none;
margin: 0px;
height: 19px;
width: 19px;
vertical-align: middle;
}

</style>
</head>
<body>
<form id="searchform" action="#"><input style=" height: 17px;
width: 142px;
padding: 1px 0;" /><input type="image" src="search.gif" /></form>
</body>
</html>







--
Bwig Zomberi

From: David Stone on
In article <hse7s1$7jh$1(a)speranza.aioe.org>,
Bwig Zomberi <zomberiMAPSONNOSPAM(a)gmail.com> wrote:

> If you want no padding, specify a unit.
> padding: 0px;
>
> If you want to inherit padding, use no unit.
> padding: 0;

Are you sure about that? CSS 2.1 8.4 Padding properties
doesn't mention units, but it does say that the value
of the shorthand property 'padding' is not inherited
unless you specify it:

'padding'
Value: <padding-width>{1,4} | inherit
Initial: not defined for shorthand properties
Applies to: all elements
Inherited: no
Percentages: refer to width of containing block
Media: visual

Section 4.3.2 on length merely indicates that units are
optional for any zero length, not that this implies inheritance.