By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,767 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,767 IT Pros & Developers. It's quick & easy.

valign=top problem

P: n/a
Consider my code:

[CODE}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>asdf</title>
</head>
<body>
<table border="0" width="100%">
<form method="post" action="blah.html">
<tr>
<td bgcolor="#ffffcc" colspan="6" valign="top">
Album (image directory):
<select name="album[]" multiple size="5">
<option value="/images">Main Image Storage Bin</option>
<option value="/images/demo-four">demo-four</option>
<option value="/images/Demo3">Demo3</option>
<option value="/images/Demo3b">Demo3b</option>
<option value="/images/Demo3c">Demo3c</option>
<option value="/images/Demo5">Demo5</option>
<option value="/images/demo6">demo6</option>
<option value="/images/handmadealbum">handmadealbum</option>

</select>
&nbsp;&nbsp;
<span style="background-color:#ddddee">
<select name="boolword['album']">
<option value="">&nbsp;</option>
<option value="AND" >AND</option>
<option value="OR" >OR</option>
<option value="AND NOT" >AND NOT</option>
</select>
&nbsp;&nbsp; - Select AND,OR,AND NOT</span>
</td>

</tr>
</form>
</table>

</body>
</html>
[/code]

Very simple table row with form elements, however, upon view in
Mozilla Firefox and Konqueror, the word content still remains at the
bottom of the table cell and not on the top as I thought '
valign="top"' would have done. Is there something else I should be
doing to ensure that the word content moves to the top?

Thanx
Phil
Jul 20 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
Consider my code:


<snip>
http://diveintomark.org/archives/200..._wont_help_you

Hint - look at where your <form> tag is (both opening and closing)

-Karl
Jul 20 '05 #2

P: n/a

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
Consider my code:

[CODE}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>asdf</title>
</head>
<body>
<table border="0" width="100%">
<form method="post" action="blah.html">
<tr>


Do you know what elements can be contained directly inside a TABLE element?
What leads you to think that FORM is one of them?

Some browsers will accept it if you leave off the DOCTYPE or at least the
DTD reference, but you're asking the browser to insist on correct
application of the HTML 4.01 Transitional rules--the rules that happen to be
spelled out in the document you are referencing, at
http://www.w3.org/TR/html4/loose.dtd.

Jul 20 '05 #3

P: n/a
Phil Powell wrote:
Consider my code:
Instead, consider posting a url. Much easier for us. And if you validate
your code, you'll see at least one problem. I don't know whether that
will fix the visual problem you have, but can't really help you until
the code is fixed. (See the link Karl Grove provided.)
<table border="0" width="100%">
<form method="post" action="blah.html">


As Karl Grove pointed out, there's (one of?) your problem(s).

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #4

P: n/a
Sorry, but I can't do that. The URL is behind a security screen that
is visible only to our server farms here (I work for a US government
subcontractor).

Phil

Brian <us*****@julietremblay.com.invalid> wrote in message news:<10************@corp.supernews.com>...
Phil Powell wrote:
Consider my code:


Instead, consider posting a url. Much easier for us. And if you validate
your code, you'll see at least one problem. I don't know whether that
will fix the visual problem you have, but can't really help you until
the code is fixed. (See the link Karl Grove provided.)
<table border="0" width="100%">
<form method="post" action="blah.html">


As Karl Grove pointed out, there's (one of?) your problem(s).

Jul 20 '05 #5

P: n/a
Yes, that was intentional. The <form> tag embeds space on IE browsers
and I was told for a long time that putting the <form> tag between a
<table> and <tr> or between <tr> and <td> eliminate the embedded space
a <form> or </form> tag generates.

I "corrected" that and put the <form> and </form> tags now around the
entire <table> block, however, the results were still the same: the
wording is at the bottom of the cell in spite of valign.

And again, I can't post the URL where this is found because it's
behind a US government subcontractor's regulated firewall that is
restricting this machine to internal view only. Sorry, blame the US
government, not me.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>asdf</title>
  6. </head>
  7. <body>
  8. <form method="post" action="blah.html">
  9. <table border="0" width="100%">
  10. <tr>
  11. <td bgcolor="#ffffcc" colspan="6" valign="top">
  12. Album (image directory):
  13. <select name="album[]" multiple size="5">
  14. <option value="/images">Main Image Storage Bin</option>
  15. <option value="/images/demo-four">demo-four</option>
  16. <option value="/images/Demo3">Demo3</option>
  17. <option value="/images/Demo3b">Demo3b</option>
  18. <option value="/images/Demo3c">Demo3c</option>
  19. <option value="/images/Demo5">Demo5</option>
  20. <option value="/images/demo6">demo6</option>
  21. <option value="/images/handmadealbum">handmadealbum</option>
  22.  
  23. </select>
  24. &nbsp;&nbsp;
  25. <span style="background-color:#ddddee">
  26. <select name="boolword['album']">
  27. <option value="">&nbsp;</option>
  28. <option value="AND" >AND</option>
  29. <option value="OR" >OR</option>
  30. <option value="AND NOT" >AND NOT</option>
  31. </select>
  32. &nbsp;&nbsp; - Select AND,OR,AND NOT</span>
  33. </td>
  34.  
  35. </tr>
  36. </table>
  37. </form>
  38. </body>
  39. </html>
  40.  

Phil

"Karl Groves" <ka**@NOSPAMkarlcore.com> wrote in message news:<c6**********@ngspool-d02.news.aol.com>...
"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
Consider my code:


<snip>
http://diveintomark.org/archives/200..._wont_help_you

Hint - look at where your <form> tag is (both opening and closing)

-Karl

Jul 20 '05 #6

P: n/a

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
Sorry, but I can't do that. The URL is behind a security screen that
is visible only to our server farms here (I work for a US government
subcontractor).


They should fire you.

-Karl
Jul 20 '05 #7

P: n/a

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
Yes, that was intentional. The <form> tag embeds space on IE browsers
and I was told for a long time that putting the <form> tag between a
<table> and <tr> or between <tr> and <td> eliminate the embedded space
a <form> or </form> tag generates.


<snip>

1. Please don't top-post. http://www.allmyfaqs.com/faq.pl?How_to_post
2. Your problem is in the fact that the 'valign' attribute is working just
fine - by vertically aligning the largest item in the cell (in this case the
multi-select) to the top of the cell. In order to accomplish what you're
after, you'll need to do one of two things - a) put each thing in its own
cell or b) design the form properly because this presentation sucks. There
are going to be serious usability and accessibility problems with what it
appears that you're trying to do.

-Karl
Jul 20 '05 #8

P: n/a

"Karl Groves" <ka**@NOSPAMkarlcore.com> wrote in message
news:c6**********@ngspool-d02.news.aol.com...

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
Yes, that was intentional. The <form> tag embeds space on IE browsers
and I was told for a long time that putting the <form> tag between a
<table> and <tr> or between <tr> and <td> eliminate the embedded space
a <form> or </form> tag generates.


BTW - HTML is not for presentation. Do not use hacks such as misplacement of
elements so that you can get the presentational effect you're after.
If you do not like the default margin around <form> then use CSS to
eliminate it.
http://www.w3schools.com/css should get you started.
-Karl
Jul 20 '05 #9

P: n/a
I thought I'd top-post this just because it annoys you. This
newsgroup being supposedly a place for people to help one another only
shows that your presence here is purely viral and utterly unnecessary.

Don't respond. Not that I'll read it anyway.

Phil

"Karl Groves" <ka**@NOSPAMkarlcore.com> wrote in message news:<c6**********@ngspool-d02.news.aol.com>...
"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
Sorry, but I can't do that. The URL is behind a security screen that
is visible only to our server farms here (I work for a US government
subcontractor).


They should fire you.

-Karl

Jul 20 '05 #10

P: n/a
Phil Powell wrote:
I thought I'd top-post this just because it annoys you. This
newsgroup being supposedly a place for people to help one another only
shows that your presence here is purely viral and utterly unnecessary.


He DID help you, even though you made it as hard for him as you possibly
could.
Matthias

Jul 20 '05 #11

P: n/a

"Phil Powell" <so*****@erols.com> wrote in message
news:1c*************************@posting.google.co m...
I thought I'd top-post this just because it annoys you. This
newsgroup being supposedly a place for people to help one another only
shows that your presence here is purely viral and utterly unnecessary.

Don't respond. Not that I'll read it anyway.


You're lying. I know you'll read this.

The truth is, I *did* help you. You got your panties in a bunch because I
also criticised you.
Well, that's too bad. See, I also work on government contracts. And I'm
saddened to think that someday I might come across markup written by you and
then have to fix it, when it should have been done properly in the first
place. Simply put, you're underqualified do your job. If you were one of my
subcontractors, I'd let you go.
-Karl
Jul 20 '05 #12

P: n/a
so*****@erols.com (Phil Powell) wrote:
And again, I can't post the URL where this is found because it's
behind a US government subcontractor's regulated firewall that is
restricting this machine to internal view only.
So, in fact, your problem was not about HTML authoring for the WWW.
Sorry, blame the US government, not me.


The US government may have made all kinds of mistakes, but it was you who
posted the message, and didn't check the FAQ before posting.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.