Vance
05-11-2008, 05:31 PM
I am playing with trying to put a form onto one of my pages and it looks great in Opera. When I open it in IE, it's a mess. Open it in Firefox and it's close to what I want but not exactly.
Is there a way to fix this so that I can get it to look like it does in Opera?
The code is:
.cssform p {
width: 300px;
clear: left;
margin: 0;
padding: 5px 0 8px 0;
padding-left: 155px; /*width of left column containing the label elements*/
border-top: 1px;
height: 1%;
}
.cssform label {
font-weight: bold;
float: left;
margin-left: -155px; /*width of left column*/
width: 150px; /*width of labels. Should be smaller than left column (155px) to create some right margin*/
}
.cssform input[type="text"] { /*width of text boxes. IE6 does not understand this attribute*/
width: 222px;
}
.cssform textarea {
width: 225px;
height: 100px;
}
fieldset {
border: 1px solid #781351;
width: 24em;
margin-left: 1.0em
}
legend {
color: rgb(153,0,0);
background: #ffa20c;
border: 1px solid #781351;
padding: 2px 6px
}
and the HTML is:
<form action="#">
<fieldset>
<legend>Additional Information Request Form</legend><br>
<form id="requestform" class="cssform" action="">
<p><label for="user">Name</label><input type="text" id="user" value="" /></p>
<p><label for="email">Email Address:</label><input type="text" id="email" value="" /></p>
<p><label for="comments">Feedback:</label><textarea id="comments" rows="5" cols="25"></textarea></p>
<p> <label for="comments">Sex:</label>Male: <input type="radio" name="sex" />
Female: <input type="radio" name="sex" /><br /></p>
<p><label for="comments">Hobbies:</label><input type="checkbox" name="hobby" /> Tennis<br />
<input type="checkbox" name="hobby" class="threepxfix" /> Reading <br />
<input type="checkbox" name="hobby" class="threepxfix" /> Basketball <br />
</p>
<p> </p>
<div style="margin-left: 150px;">
<input type="submit" value="Submit" /> <input type="reset" value="reset" />
</div>
</fieldset>
</form>
Is it safe to assume that I still need some kind of CGI/PhP type Formmailer to get the form to work? Any suggestions as to a decent mailer?
I would also like to know if I can use something like this below for Firefox? If there is, IE =Explorer, what works for Firefox?
<!--[if IE]>
<p> </p>
<![endif]-->
I am having some minor problems with a couple of other pages using Firefox and am hoping that a fix like this will work to correct the problem.
Would I be better off to just put together an external sheet for each of browers?
Thanks for any and all help,
Vance
Is there a way to fix this so that I can get it to look like it does in Opera?
The code is:
.cssform p {
width: 300px;
clear: left;
margin: 0;
padding: 5px 0 8px 0;
padding-left: 155px; /*width of left column containing the label elements*/
border-top: 1px;
height: 1%;
}
.cssform label {
font-weight: bold;
float: left;
margin-left: -155px; /*width of left column*/
width: 150px; /*width of labels. Should be smaller than left column (155px) to create some right margin*/
}
.cssform input[type="text"] { /*width of text boxes. IE6 does not understand this attribute*/
width: 222px;
}
.cssform textarea {
width: 225px;
height: 100px;
}
fieldset {
border: 1px solid #781351;
width: 24em;
margin-left: 1.0em
}
legend {
color: rgb(153,0,0);
background: #ffa20c;
border: 1px solid #781351;
padding: 2px 6px
}
and the HTML is:
<form action="#">
<fieldset>
<legend>Additional Information Request Form</legend><br>
<form id="requestform" class="cssform" action="">
<p><label for="user">Name</label><input type="text" id="user" value="" /></p>
<p><label for="email">Email Address:</label><input type="text" id="email" value="" /></p>
<p><label for="comments">Feedback:</label><textarea id="comments" rows="5" cols="25"></textarea></p>
<p> <label for="comments">Sex:</label>Male: <input type="radio" name="sex" />
Female: <input type="radio" name="sex" /><br /></p>
<p><label for="comments">Hobbies:</label><input type="checkbox" name="hobby" /> Tennis<br />
<input type="checkbox" name="hobby" class="threepxfix" /> Reading <br />
<input type="checkbox" name="hobby" class="threepxfix" /> Basketball <br />
</p>
<p> </p>
<div style="margin-left: 150px;">
<input type="submit" value="Submit" /> <input type="reset" value="reset" />
</div>
</fieldset>
</form>
Is it safe to assume that I still need some kind of CGI/PhP type Formmailer to get the form to work? Any suggestions as to a decent mailer?
I would also like to know if I can use something like this below for Firefox? If there is, IE =Explorer, what works for Firefox?
<!--[if IE]>
<p> </p>
<![endif]-->
I am having some minor problems with a couple of other pages using Firefox and am hoping that a fix like this will work to correct the problem.
Would I be better off to just put together an external sheet for each of browers?
Thanks for any and all help,
Vance