George Kourtis George Kourtis - 2 years ago 97
HTML Question

positioning of iframe with <!doctype html> active

<!doctype html>

<form id="main" method="post" enctype="text/plain" accept-charset="UTF-8">
<iframe id="dict" align="right" src="dict.html" width="15%" height="80%"></iframe>

Just starting to learn html.
If I issue from the server the text bellow and I ommit
<!doctype html>
then everything works as expected regarding the positioning and size of the iframe.
Actually if I put
<!docttype html>
everything changes and I don't know more how to have the same previous effect in the simplest way.

Answer Source

Without the doctype, browsers switch to quirks mode. I don't know the exact intricacies of these horrendous behaviors, but the standard equivalent CSS seems something like

body {
  margin: 8px; /* Usually the default value */
#dict {
  position: absolute;
  right: 8px;
  width: 15%;
  height: 80%;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download