Reply to Re: xhtml & margin-top

Your name:

Reply:


Posted by richard_quick_uk on 07/30/05 03:29

Hi,

Try this instead...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DT D/xhtml1-strict.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>Title</title>
</head>
<body>
<div style="min-height:12px;border:1px red solid; padding-top:
95px;"><input type="text" id="search"/></div>
</body>
</html>

If you're using xhtml strict you first need to make sure your page
validates (hence the inclusion of <title> tags etc).

The main problem here seems to be that you'd set the height attribute,
which Mozilla interprets correctly as a fixed height (with any content
overflowing the div by default) while IE incorrectly interprets height
as a minimum height (expanding the div to fit the content by default).

Hope this helps,

Richard Quick
-------------------
http://www.scaredoftheweb.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация