Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Alignment of Form Text Field
Old 04-11-2007, 11:15 AM Alignment of Form Text Field
DaveTodd's Avatar
Evil Psycho Alien

Posts: 684
Location: Sheffield, England
Trades: 0
I'm trying to get a Search field onto the new website. It aligns fine in FireFox, but IE seems to push it out of line for some reason. It's the SIMPLEST code, yet it still renders differently...any ideas?

The page is up at http://www.safariquip.co.uk/search.html
__________________
take care,
Dave ;)

Please login or register to view this content. Registration is FREE
DaveTodd is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-11-2007, 12:05 PM Re: Alignment of Form Text Field
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
It's because you're using a table for layout and a form has hidden space around it. This should correct the perceived problem:

Replace
HTML Code:
<td>Search: </td>
with
HTML Code:
<td valign="top">Search: </td>
You really ought to look at doing layouts without tables, however.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 04-12-2007, 12:05 PM Re: Alignment of Form Text Field
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
First up, I would say clean up the code. But, like Jeremy said, you probably want to ditch the tables too.
Also, using a label to associate the text "search" with the form field will help users with screen readers.
By not using tables, playing with the layout becomes much easier.

Also, cleaning up errors ensures you have a good starting point:
Code:
line 14 column 7 - Warning: <input> proprietary attribute "width"
line 14 column 7 - Warning: <input> proprietary attribute "height"
line 14 column 7 - Warning: <input> proprietary attribute "border"
How about this:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<style type="text/css">
form#search input,label {
    vertical-align: middle;
}
#terms2 {
    width: 10em;
}
input#image{
    height: 15px;
    width: 15px;
    boder: none;
}
</style>
</head>

<body>
<div id="searchbox">
    <form action="http://www.safariquip.co.uk/cgi-bin/search/ksearch.cgi" method="get"
        name="search" id="search">
        <label for="terms2">
            Search:
        </label>
        <input name="terms2" id="terms2" type="text" class="texta" size="15" />
        <input name="image"  id="image"  type="image"
            src="images/shopping/go.gif" alt="Search" />
    </form>
</div>
</body>
</html>
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Alignment of Form Text Field
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13301 seconds with 12 queries