473,769 Members | 6,160 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it possible to keep this on the same horizontal?

Hi,

Maybe I should break down and use tables, but I wanted to query the
experts first. Below, I would like the words "First name" and "Last
Name" to appear on the same horizontal and I would like the text
fields to appear on the same horizontal. But I would like the words
to appear above the text fields. The below creates four different
lines:

<div>
<p><label for="user_ship_ to_first_name"> First name</label><br/>
<input id="user_ship_t o_first_name" name="user[ship_to_first_n ame]"
size="30" type="text" /></p>

<p><label for="user_ship_ to_last_name">L ast name</label><br/>
<input id="user_ship_t o_last_name" name="user[ship_to_last_na me]"
size="30" type="text" /></p>
</div>

Is there any way to do what I'm asking without tables? Thanks, - Dave
Feb 15 '08 #1
2 1782
On Fri, 15 Feb 2008 19:33:22 +0100, laredotornado
<la***********@ zipmail.comwrot e:
Hi,

Maybe I should break down and use tables, but I wanted to query the
experts first. Below, I would like the words "First name" and "Last
Name" to appear on the same horizontal and I would like the text
fields to appear on the same horizontal. But I would like the words
to appear above the text fields. The below creates four different
lines:

<div>
<p><label for="user_ship_ to_first_name"> First name</label><br/>
<input id="user_ship_t o_first_name" name="user[ship_to_first_n ame]"
size="30" type="text" /></p>

<p><label for="user_ship_ to_last_name">L ast name</label><br/>
<input id="user_ship_t o_last_name" name="user[ship_to_last_na me]"
size="30" type="text" /></p>
</div>

Is there any way to do what I'm asking without tables? Thanks, - Dave
With a lot of fiddling & floating(needed for exact size, inline-block is
not supported enough) &setting exact sizes (preferable would be in em) on
the elements offcourse it would be possible. However, it seems perfectly
justifiable to me to have a row with heading (the labels), and a
row/multiple rows with values (the inputs) as a table. To many people,
wether or not a form like this can be in a table seems an edge case, I'd
say it's very defendable here.
--
Rik Wasmus
Feb 15 '08 #2
Scripsit laredotornado:
Below, I would like the words "First name" and "Last
Name" to appear on the same horizontal and I would like the text
fields to appear on the same horizontal.
Stop wanting that. It's against accessibility principles. Although this
is a fairly simple case, it's still wrong. Consider a person using a
speech browser: only after hearing a list of labels would he be prompted
for input. The <labelmarkup might help him, but just might. There's a
simple way to avoid the problems: put a label and the corresponding
field on one line, with nothing more on that line. (You can use a table
to arrange several such lines in a tabular manner, but that's a
different issue.)
<p><label for="user_ship_ to_first_name"> First name</label><br/>
<input id="user_ship_t o_first_name" name="user[ship_to_first_n ame]"
size="30" type="text" /></p>

<p><label for="user_ship_ to_last_name">L ast name</label><br/>
<input id="user_ship_t o_last_name" name="user[ship_to_last_na me]"
size="30" type="text" /></p>
</div>
The size attributes convey a wrong message visually. Two equally wide
fields suggest comparable data. However, as a rule, a person's first
name tends to be short (and you are only prompting for _a_ name),
whereas the last name can be fairly long. This should be reflected in
the field widths, helping to user notice which one is for the last name.

On the other hand, if this is for a shipping address, you should
probably prompt for a single name, to contain the person's name as used
in postal addressing. Not all people have last names, and not all
peoples write the last name last, and not all people are unique by the
first name and the last name. It's _easier_ to have just one field for
the name if you are just going to put the name on an envelope, or
something like that. In that case, it should be a fairly long field, of
course.
Is there any way to do what I'm asking without tables?
Using or not using tables is rather irrelevant. What matters is what you
do, not how you do it.

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

Feb 15 '08 #3

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

Similar topics

5
2727
by: C. Alexander | last post by:
I'm making a 'whiteboard' application. I'm trying to have 2+ connected users able to draw at the same time. However, if User1 draws a line, when User2 is drawing, on User1 screen, it will draw another line, connecting User1's, and User2's current X,Y position. Same thing happens with User2. But User3, and User4 is not drawing, and see the lines drawn individually.
3
1767
by: luke | last post by:
http://soccer.org/ notice how there's a background image at either side of the main content area. This background area keeps it's position without creating horizontal scrollbars and just dissapears behind the edges of the browser on smaller screens. This sites uses frames to acheive this, is it possible to do such a thing without them? I'm unable to think of one
10
11119
by: Dan V. | last post by:
Is it possible to have 2 divs beside each other and one not wrap around? I realize the 2 div's are floating left but I can only think of this as the best solution for now. I am trying to get the thumbnail photos and the large home rendering on top not to wrap, and only the interior/exterior photos to wrap. What do you recommend? http://www.officeactivate.com/schuit/madison.shtml
0
1866
by: dag | last post by:
Hi! I would like to do an overlap window, over my main window (of my application), with a Progress Bar. Exactly when I push a button of my application I want show a window, with a Progress bar, during the processing time. The first question is: Is it possible to have an overlap window? (I create my windows by the "CreateWindowEx" command) By which command
3
2169
by: cat | last post by:
Hi folks, We are going to update our db2 udb ee from v7.2 to v8.1 ( on aix 5.1 with fixpack 7). The problem is since our server consociation, we have 2 application running on the same server which including 5 db2 instance. Now we want to update one application ( content manager ) on that server to new version which means we need to upgrate 2 instances to db2 v8. At the same time, we will still keep the rest instances on
3
3142
by: RC | last post by:
The Subject says its all. I would like do this by JavaScript. Normally vertical scroll bar is at right side of a box and horizontal scroll bar is at bottom of a box. I would like change that. Make vertical scroll bar at left side of a box and horizontal scroll bar at top of a box.
7
3614
by: eyal.herlin | last post by:
hi, i have the following demo code: <html> <head> </head> <frameset cols="30%,*"> <frame src=""> </frame> <frame src=""> </frame>
2
8717
by: laredotornado | last post by:
Hi, I have a link and an image and I would like to keep them on the same horizontal plane. Right now, the image (named "close") is dropping below the text (that reading "New Tab"), despite the fact there are no carriage returns. The small bit of code is <a class="" href="#remote-tab-3"><span><div> New Tab <span id="moduleCount18" class="moduleCount">(0)</span> <a href="#" class="closeTab"><img name="close" src="images/
3
3719
by: ilya2 | last post by:
I am making an HTML table. It has a lot of columns with fixed width (55 pixels). If I view it on full-screen IE window, the table fits on the screen and looks just as I want it to look. When I make the window smaller than the table, I expect horizontal scroll bar to appear. Instead each column shrinks; a cell which had: word1 word2 word3 becomes:
0
9589
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
10211
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
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
8872
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
5299
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...
1
3959
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
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.