Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Positioning of form objects

Status
Not open for further replies.

psandekian

Programmer
Oct 12, 2000
48
US
Hi. I'm fairly new to HTML and CSS so please forgive me if I ask a simple question.

I'm creating a contact form that the user will type in information and hit the submit button. It works but I would like to make it "look" better. Should I use style sheets to position my form inputs or use a table? Is there some other method that would be better?

I was thinking of creating 2 boxes (one for my descriptions and one for my inputs) and then have them side by side. I just don't know how to do this and I can't seem to find any CSS tutorial that shows an example of this. I have the boxes but they are stacked, not side by side.

Any suggestions is greatly appreciated!
Thanks.
Patty
 
well you can do something like this
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td>descriptions</td>
<td>the input box goes in here</td>
</tr>
<tr>
<td >descriptions</td>
<td>the input box</td>
</tr>
</table>

as for implementing the style sheets are concerned you can go to and look for tutorials on CSS. they have some really good ones. Other than that you could even go to and look for some tutorials on HTML and CSS there too. Wish you all the luck
 
CSS is the ideologically preferred solution, however tables (as nitinkhanna suggested) are the practically preferred solution because they are backward-compatible and work more reliably on more browsers.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Tables are backwards compatible but, DIV and SPAN work better for positioning text en images. Go to for more information about these tags. It's also a great site for everyone who is working with dhtml.

Qwark
 
psandekian, just a note, but be careful using DIV and SPAN --they don't get along to well with netscape

ray
rheindl@bju.edu

 
Oke FroggerIII, that's you opinion. DIV works perfect with Netscape when you use it in the right way, I have made pages with DIV which are working in both browsers IE en Netscape. BTW the new Netscape 6 is handeling DIV, SPAN and CSS much better than IE 4 and IE 5.

Qwark
 
Thanks guys! I currently have it set up with a table but I do want to change it so I learn the latest and greatest.

I have noticed a big difference between IE 5 and Netscape 6. My borders (using CSS) aren't the same at all. Maybe I'm doing those wrong too. I will check out that website.

Anyway, since I'm new to this, can you give me your honest opinion?


Thanks!
Patty
 
Qwark, I didn't mean that he shouldn't try it. I was just saying that using DIV in ns usually takes a little bit more work (also, my organization's standard browser is ns4.6. just because something works well with ns6 and ie5, it is still best to have a little backward compatibility)

ray
rheindl@bju.edu

 
Sorry, Qwark, it just is not true. Tables are still better at laying out a page (especially with images) than layers. And it will work all the way back to the earliest browsers. Your layers pages will only work on 4+, and some features are even newer. Eventually, when enough people are using the newest browsers, we can all use layers to position content, but in the meantime, tables are better.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top