On Sunday, April 25, 2010 5:12:37 pm Chris F.A. Johnson wrote:
> On Sun, 25 Apr 2010, John Franks wrote:
> > I have put together a simple finished web page below to help show my
> > problem and what I am trying to achieve.
> > 
> > The page shows a pink background box which needs to be 62 pixels
> > high. Inside that pink background I need the input text box together
> > with its submit button to sit smack bang in the center, both
> > vertically and horizontally.
> > 
> > Here is my main problem - I need it to look identical in all of the
> > following main browsers, including having the text vertically align
> 
> > in the center of the input fields i.e. line heights etc:
>    You cannot.
> 
>    You can't even make it identical in the same browser. People have
>    different window sizes, different font sizes, different fonts,
>    etc..
> 
>    <http://cfajohnson.com/testing/form.html>

<table>
  <tr>
    <td>
      <input value="Search entire shop here"/> <input type="submit" 
value="Submit"/>
    </td>
  </tr>
</table>

table {
  height: 62px;
  margin: 0 auto;
  background-color: pink;
  width: 90%;
}

td {
  text-align: center;
  vertical-align: middle;
}

That's about as close as you'll be able to come.

---Tim
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to