473,729 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to display table and select next to each other

How to display table and select next to each other?

<html>
<body>
<table border=1 style="display: inline-table">
<tr><td>Hello 1</td></tr>
<tr><td>Hello 2</td></tr>
<tr><td>Hello 3</td></tr>
<tr><td>Hello 4</td></tr>
<tr><td>Hello 5</td></tr>
</table>
<select size="3">
<option value="1">1</option>
<option value="1">2</option>
<option value="1">3</option>
</select>
</body>
</html>

In Mozilla 3.0.1, the table is on the left with 5 rows of data. The
select of size 3 is next to it, thanks to the inline-table, which is
fine. However, the bottom of the select aligns with the bottom on the
first table cell. What I want is the top of the select to align with
the top of the table.

IE 7 displays the select below the table, ignoring the inline-table
directive.

So the question is how to get it to align the top of the select with
the top of the table in Mozilla and IE.

Thanks.
Sep 8 '08 #1
10 4615
On Sun, 7 Sep 2008 18:01:04 -0700 (PDT)
"re************ *@yahoo.com" <re************ *@yahoo.comwrot e in:
<ae************ *************** *******@r15g200 0prh.googlegrou ps.com>
How to display table and select next to each other?
[snip]
So the question is how to get it to align the top of the select with
the top of the table in Mozilla and IE.
Consider supporting just a few more browsers.

The following URL may display as desired. It does use a wee bit of
invalid CSS in an attempt to support more Mozilla browsers.

http://tinyurl.com/5fmn8o

--

BootNic Sun Sep 7, 2008 11:09 pm
Humor is emotional chaos remembered in tranquility.
*James Thurber*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkj El3YACgkQylMUzZ O6jeLIJwCggrP+d o9ah9wp3v6AUVOT x+/J
ZJMAoK4YiZwVZth uUYaVVdKsdzrJHA EX
=/u7g
-----END PGP SIGNATURE-----

Sep 8 '08 #2
On 2008-09-08, re************* @yahoo.com <re************ *@yahoo.comwrot e:
How to display table and select next to each other?

<html>
<body>
<table border=1 style="display: inline-table">
<tr><td>Hello 1</td></tr>
<tr><td>Hello 2</td></tr>
<tr><td>Hello 3</td></tr>
<tr><td>Hello 4</td></tr>
<tr><td>Hello 5</td></tr>
</table>
<select size="3">
<option value="1">1</option>
<option value="1">2</option>
<option value="1">3</option>
</select>
</body>
</html>

In Mozilla 3.0.1, the table is on the left with 5 rows of data. The
select of size 3 is next to it, thanks to the inline-table, which is
fine. However, the bottom of the select aligns with the bottom on the
first table cell. What I want is the top of the select to align with
the top of the table.
IE 7 displays the select below the table, ignoring the inline-table
directive.

So the question is how to get it to align the top of the select with
the top of the table in Mozilla and IE.
vertical-align: top on the inline table should do the trick, but not in
browsers that don't support inline-table.

You may have more luck in IE by just floating the table left instead.

By the way your markup is not valid. Check it at http://validator.w3.org
(or with nsgmls).
Sep 8 '08 #3
On 8 Sep, 03:01, "removeps-gro...@yahoo.co m" <removeps-
gro...@yahoo.co mwrote:
How to display table and select next to each other?
<html>
Don't you have a DOCTYPE declaration?
<body>
The document should at least have a title.
<table border=1 style="display: inline-table">
* <tr><td>Hello 1</td></tr>
* <tr><td>Hello 2</td></tr>
* <tr><td>Hello 3</td></tr>
* <tr><td>Hello 4</td></tr>
* <tr><td>Hello 5</td></tr>
</table>
<select size="3">
* <option value="1">1</option>
* <option value="1">2</option>
* <option value="1">3</option>
</select>
</body>
</html>

In Mozilla 3.0.1, the table is on the left with 5 rows of data. *The
select of size 3 is next to it, thanks to the inline-table, which is
fine. *However, the bottom of the select aligns with the bottom on the
first table cell. *What I want is the top of the select to align with
the top of the table.

IE 7 displays the select below the table, ignoring the inline-table
directive.
So is FF2, too.
So the question is how to get it to align the top of the select with
the top of the table in Mozilla and IE.
<table border=1 style="float: left; margin-right: 1em">
Sep 8 '08 #4
On Sep 8, 12:21*am, Ben C <spams...@spam. eggswrote:
By the way your markup is not valid. Check it at http://validator.w3.org
(or with nsgmls).
Thanks. Is there a way to validate a file? In the URL there I
entered

file:///C:/Documents%20and %20Settings/whatever

and it says that type of URL is not supported.

I know I didn't have a DOCTYPE.

Dreamweaver has a function to validate markup, and it only says that
my select tag is missing the name value. Strange.

http://www.validome.org/ lets you upload a file to validate, and it
errors out that DOCTYPE is missing. After I enter the DOCTYPE, an
empty head section, I get several errors.
Sep 8 '08 #5
re************* @yahoo.com wrote:
On Sep 8, 12:21 am, Ben C <spams...@spam. eggswrote:
>By the way your markup is not valid. Check it at http://validator.w3.org
(or with nsgmls).

Thanks. Is there a way to validate a file? In the URL there I
entered

file:///C:/Documents%20and %20Settings/whatever

and it says that type of URL is not supported.
You can't check a local file on your hard drive using the "Validate by
URI" tab.

First add a valid doctype:

http://www.w3.org/QA/2002/04/valid-dtd-list.html

Then go to the validator page and click the "Validate by file upload"
tab. Browse to the file you want to check.
--
Ed Mullen
http://edmullen.net
Why do banks charge you a non-sufficient funds fee on money they already
know you don't have?
Sep 8 '08 #6
On 2008-09-08, re************* @yahoo.com <re************ *@yahoo.comwrot e:
On Sep 8, 12:21*am, Ben C <spams...@spam. eggswrote:
>By the way your markup is not valid. Check it at http://validator.w3.org
(or with nsgmls).

Thanks. Is there a way to validate a file? In the URL there I
entered

file:///C:/Documents%20and %20Settings/whatever

and it says that type of URL is not supported.
That's because the website can't read a file from your local disk. In
general that's a good thing-- you don't want just any website you visit
to be able to read your personal files.

You can use the "Direct Input" option and just paste your markup into
the box.
I know I didn't have a DOCTYPE.

Dreamweaver has a function to validate markup, and it only says that
my select tag is missing the name value. Strange.
You have to have a DOCTYPE to validate properly, and you should use one
anyway to avoid the unpredictabilit y of quirks mode.

Use this one:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
http://www.validome.org/ lets you upload a file to validate, and it
errors out that DOCTYPE is missing. After I enter the DOCTYPE, an
empty head section, I get several errors.
Yes that sounds like it's doing something.
Sep 8 '08 #7
Ben C schrieb:
On 2008-09-08, re************* @yahoo.com <re************ *@yahoo.comwrot e:
>On Sep 8, 12:21 am, Ben C <spams...@spam. eggswrote:
>>By the way your markup is not valid. Check it at http://validator.w3.org
(or with nsgmls).
Thanks. Is there a way to validate a file? In the URL there I
entered

file:///C:/Documents%20and %20Settings/whatever

and it says that type of URL is not supported.

That's because the website can't read a file from your local disk.
You would request a file "/C:/Documents%20and %20Settings/whatever" on
the _W3C's validator web server_. This may not exist. And, of course,
they don't want anybody to read files on _their_ server.

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Sep 8 '08 #8

BootNic wrote:
>
The following URL may display as desired. It does use a wee bit of
invalid CSS in an attempt to support more Mozilla browsers.

http://tinyurl.com/5fmn8o
Forget the invalid CSS... I thought surely this is invalid HTML - a
select element that is *not* inside a form element - yet it passes HTML
4.01 Strict validation.

Curious.

--
Berg
Sep 8 '08 #9
On 8 Sep, 22:36, Bergamot <berga...@visi. comwrote:
BootNic wrote:
The following URL may display as desired. It does use a wee bit of
invalid CSS in an attempt to support more Mozilla browsers.
http://tinyurl.com/5fmn8o

Forget the invalid CSS... I thought surely this is invalid HTML - a
select element that is *not* inside a form element - yet it passes HTML
4.01 Strict validation.

Curious.
The HTML is valid. A div element can contain a flow entity (block or
inline).
A form control, like select, is an inline element:

<!ELEMENT DIV - - (%flow;)* -- generic language/style
container -->
<!ENTITY % flow "%block; | %inline;">
<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; |
%formctrl;">
<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">

http://www.w3.org/TR/REC-html40/sgml/dtd.html

"The elements used to create controls generally appear inside a FORM
element, but may also appear outside of a FORM element declaration
when they are used to build user interfaces."
<http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.2.1>
Sep 8 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
6927
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the JavaScript in this code from a couple different sites but I'm not 100% sure what each line is doing...This is the ASP code that I'm using for the page....Take a look at the JavaScript code and please let me know what each line is doing....I have been...
3
6917
by: Joachim Klassen | last post by:
Hi all, first apologies if this question looks the same as another one I recently posted - its a different thing but for the same szenario:-). We are having performance problems when inserting/deleting rows from a large table. My scenario: Table (lets call it FACT1) with 1000 million rows distributed on 12
3
3874
by: blindsey | last post by:
Is there a tool that can take an Access database and generate SQL "CREATE TABLE" statements for all the tables in it?
0
5822
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database which indexes computer magazine articles for personal reference. I am developing a Visual Basic.NET program whose sole purpose is to enter new records into the database. No updates to existing entries, no deletions, and no display
9
1952
by: Ben R. | last post by:
Hi guys, I've got a DB table of timecards with these fields in the table: ID (Int) UserID (Int) DateWorked (DateTime) HoursWorkedOnThatDate (Double) I'd like to display a grid, with Monday - Sunday across the top (in columns)
2
3414
by: KarlosSultana | last post by:
Hello to those who read this, this is my first ever post! I am currently getting very confused trying to put a <form> in a table-cell: Firstly I have a <div> styled with display:table -this forms the "footer" box on my page. Next I have two nested <div>s styled with display:table-cell that I want to appear side-by-side. I can put a little <p> inside each one with some text and all is well. Now what I want in the end is a <form> with...
4
2434
by: rn5a | last post by:
A MS-Access DB has 3 tables - Teacher, Class & TeacherClass. The Teacher table has 2 columns - TeacherID & TeacherName (TeacherID being the primary key). The Class table too has 2 columns - ClassID & ClassName (ClassID being the primary key) The TeacherClass table has 3 columns - TCID (AutoNumber), TeacherID & ClassID. One teacher can teach multiple classes & one class can be taught by multiple teachers. The TeacherClass table basically...
7
12071
by: TG | last post by:
hi! I am trying to create a sql server table from an excel sheet. Here is the code I have: 'This procedure the xlsx file and dumps it to a table in SQL Server
0
2895
by: removeps-groups | last post by:
Now I'm wondering how to display 3 elements next to each other. I came up with the following solution using float:left, but would like opinions if this is the right way to go. The idea is to have an outer div, which in my example below is id="available". Inside this div is a table with float:left. Then is another div with overflow:hidden, which will be on the right. And inside this right div is the same pattern: that is, there is a...
0
8913
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9142
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8144
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6016
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.