• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Taylor
#1 Posted : Tuesday, August 28, 2007 9:03:40 AM(UTC)
Taylor

Rank: Member

Joined: 7/15/2004(UTC)
Posts: 368

Just a question to see if I'm missing something on the login page. If you look at the code you will see 4 div's.

Code:
<div class="wrapone">
<div class="wraptwo">
<div class="wrapthree">
<div class="wrapfour">


I'm curious to see what the thought was here, is there something more that this page can or was meant to do? Why so many div's? It's not typical of the rest of the site.
Cliff
#2 Posted : Tuesday, August 28, 2007 2:51:03 PM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

I imagine it's there so you can use four background images to create rounded corners, or something like that.
scott.mech
#3 Posted : Thursday, August 30, 2007 2:40:13 PM(UTC)
scott.mech

Rank: Member

Joined: 4/4/2004(UTC)
Posts: 670

Cliff,

The validator doesn't seem to accept a lot of email addresses on that login page either.

GRRRRRRR.... <fieldset> <legend> <td> <div> GRRRRRRR......


Scott Mech
Cliff
#4 Posted : Thursday, August 30, 2007 2:52:23 PM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

I'd imagine the validation expression needs to be revisited. Andy posted an interesting article on email validation the other day: http://haacked.com/archive/2007...ail-address-until-i.aspx

The fieldset and legend tags are semantic and should be there, but all those tables and DIVs should not. There are much better ways to lay out a form than with tables. I prefer definition lists, which are much more flexible and make more sense when viewing a page without styles or via a mobile device.
Andy Miller
#5 Posted : Thursday, August 30, 2007 3:35:33 PM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: "Cliff" Go to Quoted Post

I prefer definition lists, which are much more flexible and make more sense when viewing a page without styles or via a mobile device.
Like this?


Marking the labels with a &lt;label&gt; tag would be even better. For example,





Code:

&lt;dl&gt;
&lt;dt&gt;&lt;label for="name"&gt;Name:&lt;/label&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;input type="text" name="name" id="name" size="40" /&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;label for="email"&gt;Email:&lt;/label&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;input type="text" name="email" id="email" size="40" /&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;label for="website"&gt;Website:&lt;/label&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;input type="text" name="website" id="website" size="40" /&gt;&lt;/dd&gt;
&lt;/dl&gt;

I'll have to experiment with &lt;dl&gt; more. Although &lt;dl&gt; formatting options are more flexible, if I want a horizontal relationship between label and field, a table has some nice default formatting features such as easy-to-use vertical alignment choices and common-sense breaks across printed pages or small screens. I'm a little concerned that the label and field can be separated if they are both floats and have very different content (so that one is formatted with much more vertical space).
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
Cliff
#6 Posted : Thursday, August 30, 2007 5:37:30 PM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

Yeah, exactly. This page (http://www.kingofthelist.com/account/login) is how I generally lay them out. If you view it without styles, it still makes sense, and is lightweight.

The <label> tag is important, both for accessibility and usability, since clicking a label puts focus on the associated input. I struggled with this during the BVC5 beta, but found that if you add something like AssociatedControlID="UsernameField" to the asp:Label, it converts it from a <span> to a <label>. BVC5 now uses this in the login page, but not many other places.

You're absolutely right, it takes a bit of extra work to make sure the form is bulletproof when using <dl>. I still have some experimenting to do, especially for cases where the user has increased the browser's font size significantly.
scott.mech
#7 Posted : Sunday, September 2, 2007 10:57:52 AM(UTC)
scott.mech

Rank: Member

Joined: 4/4/2004(UTC)
Posts: 670

I have fiddled and fiddled with similar....

Today, I render something like:

<fieldset>
<legend>Sample Information</legend>
<label for="NameField" id="lblName">Your Name</label><br class="nobr" />
<input name="NameField" type="text" id="NameField" class="textfield" />
<br />
<label for="EmailField" id="lblEmail">Your Email Address</label><br class="nobr" />
<input name="EmailField" type="text" id="EmailField" class="textfield" />
<br />
<label for="PhoneNumberField" id="lblPhone">Your Phone Number</label><br class="nobr" />
<input name="PhoneNumberField" type="text" id="PhoneNumberField" class="textfield" />
<br />
</fieldset>


I went this route after having issues with text resizing. Can you guys show me how it will blow up?

Scott Mech
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012