Form layout problem

D

dorayme

"Aaron Gray said:
Hi,

I am having problems with a form taking too much vertical space.

The test example is here :-

http://www.aarongray.org/Test/HTML/Form/test.html

I have put a border around the form. It should take up less height than it
is doing.

Hope you can show me what I am missing or doing wrong.

Many thanks in advance,

Aaron

First, it does not take up much height at all in my FF or Safari.
Second, use a doctype and validate it.
 
R

rf

Aaron Gray said:
Hi,

I am having problems with a form taking too much vertical space.

The test example is here :-

http://www.aarongray.org/Test/HTML/Form/test.html

I have put a border around the form.

No, you haven't. You've put a border on the div that contains the form.
It should take up less height than it is doing.

The form is taking up as much vertical space as you have told it to, 10
pixels. Firebug confirms this. It's the div that is taking up extra space,
probably the forms margin-bottom.
Hope you can show me what I am missing or doing wrong.

You are running the browser in quirks mode where it emulates all the bugs
from older versions. Supply a valid doctype (strict HTML 4.01) and things
will change considerably.
 
A

Aaron Gray

dorayme said:
First, it does not take up much height at all in my FF or Safari.

Okay I have tried that now.
Second, use a doctype and validate it.

Yes, I have been lazy. Although Google does not use doctype !:)

Thanks,

Aaron
 
A

Aaron Gray

rf said:
No, you haven't. You've put a border on the div that contains the form.


The form is taking up as much vertical space as you have told it to, 10
pixels. Firebug confirms this. It's the div that is taking up extra space,
probably the forms margin-bottom.

Yep, its the forms margin-bottom on IE !
You are running the browser in quirks mode where it emulates all the bugs
from older versions. Supply a valid doctype (strict HTML 4.01) and things
will change considerably.

Yes, forgot about quirks mode !

Many thanks,

Aaron
 
A

Adrienne Boswell

Okay I have tried that now.


Yes, I have been lazy. Although Google does not use doctype !:)

Who cares about Google? Google is not a browser.

One thing Google does like, however, is error free marked up pages.
It's a lot easier to parse good markup than tag soup.
 
V

Vince Morgan

Aaron Gray said:
Yes, forgot about quirks mode !

Many thanks,

Aaron
Your markup appears to be XHTML so you need a doctype for that, or change
the markup to HTML and add a corresponding doctype.
 
V

Vince Morgan

Aaron Gray said:
Hi,

I am having problems with a form taking too much vertical space.

The test example is here :-

http://www.aarongray.org/Test/HTML/Form/test.html
If you put the form tags outside the div you don't have the problem in IE6,
or Mozilla.
Ie:
<form method="post" action="test.html">
<div id="header-right">

<input type="text" name="query" size="40" value="">
<input type="submit" name="submit" value="Search">

</div>
</form>
Can't say that it's good form to do so, but it works.
HTH
Vince
 
A

Aaron Gray

Vince Morgan said:
Your markup appears to be XHTML so you need a doctype for that, or change
the markup to HTML and add a corresponding doctype.

Yes, I am intending on using XHTML.

Aaron
 
A

Aaron Gray

Vince Morgan said:
If you put the form tags outside the div you don't have the problem in
IE6,
or Mozilla.
Ie:
<form method="post" action="test.html">
<div id="header-right">

<input type="text" name="query" size="40" value="">
<input type="submit" name="submit" value="Search">

</div>
</form>
Can't say that it's good form to do so, but it works.

Ah, thats why the Google homepage renders correctly.

Aaron
 
J

Jonathan N. Little

Aaron said:
Ah, thats why the Google homepage renders correctly.

Only because browsers have quirks mode and can parse tag soup. Also
there is really very little content to screw up.
 
D

dorayme

"Jonathan N. Little said:
Why? Do you have a reason?

A lot of people read sentences like: "HTML is now an Internet
standard maintained by the World Wide Web Consortium (W3C). The
most recent version is HTML 4.01, though it has been superseded
by XHTML." (http://en.wikibooks.org/wiki/Programming:HTML) and
see that a fine online website that teaches website standard
markup uses it (htmldog.com) draw some obvious and reasonable but
false conclusions. The problem is a runaway train, it is unlikely
to be able to be stopped and put on a slower steadier controlled
course.
 
J

Jukka K. Korpela

Scripsit dorayme:
A lot of people read sentences like: "HTML is now an Internet
standard maintained by the World Wide Web Consortium (W3C).

That's of course common wikinonsense. There is no Internet standard on
HTML, and Internet standards are not defined by the W3C but by the IETF.
 
A

Aaron Gray

Chris F.A. Johnson said:
Are there any that trump the fact that the most commonly used
browser doesn't support XHTML? If so, please explain.

Wikipedia uses XHTML Transitional so I was planning on using that as I am
working on a WYSIWYG Wiki which will be simular to that.

Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top