Size of forms fields and style sheets

Posted on 2006-07-19
Last Modified: 2010-04-09
Can I control de size (height) and position of the input fields of a form with a style sheet?

If so how?

I have this this in my site:

In ie  fields fall perfectly on image but using firefox the fall differently... what is the problem?
Question by:robrodp
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 17141501
You can, but not the way you are doing it.  I'll post some better help shortly

Expert Comment

ID: 17141847
This is just a start, but it should help you get going.  Take this code and put it in a file called stylesheet.css  (keep it in the same folder as indexs.html)

/* CSS Document */

div#one {
div#two {

Now take this code and use it for indexs.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stylesheet.css" rel="stylesheet" type="text/css">


<form name="uno">
<table border="0" width="642" height="480" cellspacing="0">
<tr height="121">
      <td colspan="2" width="642" height="121" background="top.gif"></td>
<tr height="336">
      <td width="266" background="left.gif"></td>
      <td width="376" background="right.gif">
<tr height="24" width="642"><td colspan="2" width="642" background="bottom.gif"></td></tr>

<div id="one"><input type="text" size="21"></div>
<div id="two"><input type="text" size="38"></div>


This is all done with div's.  The stylesheet tells the div where to place itself on the page.  This should get you going, feel free to respond with any other questions about this/divs/how i did it...

Accepted Solution

koolie earned 500 total points
ID: 17141861
oh..i just noticed a small problem..the closing form tag,  </form> , should be placed after the last <div> tag.

You could(and probably should) essentially have

<div id="one"></div>
<div id="two"></div>

Author Comment

ID: 17142696
Will wait... thanks

Author Comment

ID: 17142717

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
html input 8 56
Output to HTML in powershell 3 39
CSS DIV Height in Percent 1 27
CSS for Popup in ASP.NET 4 16
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question