473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

valign=top problem

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
12 17742

"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

"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
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
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
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

"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

"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

"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
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
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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John | last post by:
Below is my code. It seems that no matter what I do, I cannot get the following list of places to start at the top of the cell. It is always centered in the middle of the cell. Is vAlign the...
0
by: Arne | last post by:
I use valign=top frequently in my web pages. This attribute doesn't always do anything in a complicated layout of nested tables. I don't know how I get my nested tables mixed up so that valign=top...
0
by: CoreyMas | last post by:
Hello everyone, I have downloaded and installed the IE Web controls for Microsoft and I am using the Treeview control to display a simply hierarchy However, I cannot seem to get the Image...
4
by: dterrors | last post by:
How do you do valign=top for a table cell in CSS? (and align=left at the same time)?
2
by: Arne | last post by:
I have problems aligning my left menu with the valign=top: http://test.unitedhardware.com/valign.html It happens a lot when the the middle pane is very complicated with a lot of nested tables. ...
2
by: Arne | last post by:
I have problems aligning my left menu with the valign=top: http://test.unitedhardware.com/valign.html It happens a lot when the the middle pane is very complicated with a lot of nested tables. ...
2
by: Arne | last post by:
I have problems aligning my left menu with the valign=top: http://test.unitedhardware.com/valign.html It happens a lot when the the middle pane is very complicated with a lot of nested tables. ...
7
by: maya | last post by:
I have an image and right next to the image I have some text, all w/in the same <td>.. but, even though I have valign="top" for the <td>, the text does not appear on top of the <td>, it appears...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.