HighDots Forums  

select statement question...

alt.html alt.html


Discuss select statement question... in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dba
 
Posts: n/a

Default select statement question... - 05-09-2008 , 04:53 PM






Trying to use size parameter in select statement. Problem... it raises
the box from the line instead of lowering it.

Select an area {box with multiple select items only showing one} then
select a {box with multiple select items only showing one}. Select boxes
line up with the text line.

However, when I use the size parameter to show two variables at a time
the box moves up on line instead of down one line. Is there a way to
reverse that and have the box "lower?" on line?

Any assistance will be appreciated.

Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: select statement question... - 05-10-2008 , 08:21 AM






Scripsit dba:

Quote:
Trying to use size parameter in select statement. Problem... it raises
the box from the line instead of lowering it.
The select element is inline by default, and it participates in
rendering as if it were a large letter. In particular, its lower edge
sits on the baseline of text.

Quote:
Select an area {box with multiple select items only showing one} then
select a {box with multiple select items only showing one}. Select
boxes line up with the text line.
That's because the elements are vertically smaller than the line height,
or just a little taller. (Actually, what matters is whether the element
is taller than the distance from baseline to the upper edge of the line,
as defined by its line height.)

Quote:
However, when I use the size parameter to show two variables at a time
the box moves up on line instead of down one line. Is there a way to
reverse that and have the box "lower?" on line?
To change this, you change the vertical-align property of the select
elements.

You can add the following to your CSS stylesheet:

select { vertical-align: text-top; }

Quote:
Any assistance will be appreciated.
The best approach is to put one input item and its label on one line.
This is good for clarity and for accessibility. Example:

<div><label>Area: <select ...>...</select></label></div>

You may still have the same problem in rendering, but the solution is
the same. Besides, now you have the option of using a table, with labels
in one column, input fields in another.

Don't try to construct a sentences that contain input items. If
explanations are needed, present them as such as text before the input
items.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #3  
Old   
dba
 
Posts: n/a

Default Re: select statement question... - 05-10-2008 , 08:25 PM



Thanks much, will try your very detailed advice immediately. Seems like
your are very skilled so I will beg your indulgence and ask one more
question.

Using a form to present database fields for selection. Have been trying
using radio buttons etc to get it so the user can select one person from
a multiple person presentation. Not have any success.

Any thoughts on this you would like to share?

Again, thanks for the assistance.


Jukka K. Korpela wrote:
Quote:
Scripsit dba:

Trying to use size parameter in select statement. Problem... it raises
the box from the line instead of lowering it.

The select element is inline by default, and it participates in
rendering as if it were a large letter. In particular, its lower edge
sits on the baseline of text.

Select an area {box with multiple select items only showing one} then
select a {box with multiple select items only showing one}. Select
boxes line up with the text line.

That's because the elements are vertically smaller than the line height,
or just a little taller. (Actually, what matters is whether the element
is taller than the distance from baseline to the upper edge of the line,
as defined by its line height.)

However, when I use the size parameter to show two variables at a time
the box moves up on line instead of down one line. Is there a way to
reverse that and have the box "lower?" on line?

To change this, you change the vertical-align property of the select
elements.

You can add the following to your CSS stylesheet:

select { vertical-align: text-top; }

Any assistance will be appreciated.

The best approach is to put one input item and its label on one line.
This is good for clarity and for accessibility. Example:

div><label>Area: <select ...>...</select></label></div

You may still have the same problem in rendering, but the solution is
the same. Besides, now you have the option of using a table, with labels
in one column, input fields in another.

Don't try to construct a sentences that contain input items. If
explanations are needed, present them as such as text before the input
items.


Reply With Quote
  #4  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: select statement question... - 05-11-2008 , 01:22 AM



Scripsit dba:

Quote:
Using a form to present database fields for selection. Have been
trying using radio buttons etc to get it so the user can select one
person from a multiple person presentation. Not have any success.
Can you please post the URL of your attempt? The basic idea is that you
just a have a set of <input type="radio" ...> elements with the same
name="..." attribute. There are complications if you want to make things
work smoothly and reliably, especially the initial selection problem
(see http://www.cs.tut.fi/~jkorpela/forms/choices.html ), but apart from
that, the following approach should work well:

<div>Please select a person:</div>
<div><label><input type="radio" name="person" value="John Doe">John
Doe</label></div>
<div><label><input type="radio" name="person" value="Jane Doe">Jane
Doe</label></div>
...

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.