Solved

Size of forms fields and style sheets

Posted on 2006-07-19
5
176 Views
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:

http://primeroseguridad.com/kpmg/indexs.html

In ie  fields fall perfectly on image but using firefox the fall differently... what is the problem?
0
Comment
Question by:robrodp
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

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

Expert Comment

by:koolie
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 */
body{
      margin:0;
      padding:0;
}

div#one {
      position:absolute;
      top:186px;
      left:445px;
}
div#two {
      position:absolute;
      top:206px;
      left:343px;
}

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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">

</head>

<body>
<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>
<tr height="336">
      <td width="266" background="left.gif"></td>
      <td width="376" background="right.gif">
 <p>&nbsp;</p>
      </td>
</tr>
<tr height="24" width="642"><td colspan="2" width="642" background="bottom.gif"></td></tr>

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

</body>
</html>

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...
0
 
LVL 5

Accepted Solution

by:
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
<table>
.....
</table>

<form>
<div id="one"></div>
<div id="two"></div>
etc...
</form>
0
 

Author Comment

by:robrodp
ID: 17142696
Will wait... thanks
0
 

Author Comment

by:robrodp
ID: 17142717
Ok...
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Specific DIV Hyperlink Color 1 39
Page not loading properly 15 39
Menu Inconsistent 3 20
Bootstrap 3 icons 3 9
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now