which is almost right on Chrome and firefox but the problem is the position of the submit button on IE if too right than the css. Please check the code and help as soon as possible.
HTML &CSS Code you can find on the link http://jsfiddle.net/7vUW6/
i saw your codings and fix the issues , you had some mistakes accroding to the input box not set the proper width.
Then the submit button is also i fix the issues and i check all the browers now alignment is correct.The edit coding as follows. please copy this code and run your system.
complete codings:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Customer Advance and Project Registration System | Ymoff Technologies Pvt. Ltd.</title>
<meta name="description" content="This is Project Registration and Customer Advance Payment Recept System designed and developed for Ymoff Technologies." />
<link type="text/css" rel="stylesheet" href="stylesheets/style.css" />
<link rel="shortcut icon" href="favicon.ico" />
<script src="js/jquery-1.6.4.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script>
$(document).ready(function(){
$("#form1").validate();
});
</script>
<script type="text/javascript">
function clearThis(target){
target.value= "";
}
</script>
<script type="text/javascript">
function autoGrow (oField) {
if (oField.scrollHeight > oField.clientHeight) {
oField.style.height = oField.scrollHeight + "px";
}
}
</script>
<style>
/*-- Reset CSS --*/
.wraper{
width:70%;
margin: 0px auto;
padding:0;
}
#field {
}
#ftext{
font-family: 'Capriola', sans-serif;
}
#btext{
font-family: 'Quando', serif;
font-weight:400;
}
#space{
padding-left:5%;
}
.submit{
padding-left:54%;
padding-right:60%;
clear:both;
}
#value{
color:#999;
}
textarea {
resize: none;
}
#noscrollbars {
overflow:hidden;
}
#inform{
color:#C00;
font-size:12px;
text-align:justify;
}
select{
color:#00F;
}
textarea{
border-right: #a9a9a9 1px solid;
border-top: #a9a9a9 1px solid;
border-left: #a9a9a9 1px solid;
border-bottom: #a9a9a9 1px solid;
color:#00F;
}
#show1{
color:#10e684;
font-size:18px;
font-weight:600;
}
#show2{
color:#9e2a28;
font-size:18px;
font-weight:600;
}
#show3{
color:#9e2a28;
font-size:10px;
}
fieldset{
width:400px;
padding-top:5px;
}
legend{
font-family: "Quando", serif;
}
.umame
{
text-align:right;
float:left;
padding-bottom:5px;
padding-right:8px;
}
.umame1
{
text-align:left;
float:left;
padding:0px;
margin:0px;
padding-bottom:5px;
}
</style>
</head>
<body class="wraper">
<div>
<img src="images/dashboardlogin.png" style="padding-top:10px; padding-left:15%;" />
<br />
<br />
<div class="container">
<center>
<br /><br /><br />
<h2 id="btext">Please perfectly enter the following fields :</h2>
<form name="login" action="" method="post">
<fieldset>
<table width="337" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="169" class="umame">
<span id="ftext">Client Registration ID <span style="color:#C00;">*</span></span>
</td>
<td width="156" class="umame1">
<input type="text" name="userid" value="Cleint Registraion ID" style="color:#999; width:156px;" onfocus="if(this.value==this.defaultValue){this.value='';}this.style.color='#000';" onblur="if(this.value==''){this.value=this.defaultValue;this.style.color='#999';}" />
</td>
</tr>
<tr>
<td class="umame" width="169">
<span id="ftext">Temporary Password <span style="color:#C00;">*</span></span>
</td>
<td width="156" class="umame1">
<input type="password" name="password" value="***************" style="color:#999; width:156px;" onfocus="if(this.value==this.defaultValue){this.value='';}this.style.color='#000';" onblur="if(this.value==''){this.value=this.defaultValue;this.style.color='#999';}" />
</td>
</tr>
<tr>
<td class="umame" width="169"> </td>
<td width="156" class="umame1">
<input type="submit" name="ok" value="Login" />
</td>
</tr>
</table>
</fieldset>
</form>
<table width="337">
<tr>
<td ><span id="inform"><br />
* Marks fields are sent to you by E-Mail when your project has been registered with us. If any how if you lost our mail and want to get your Password, please visit this link Get Password with your YMOFF Registration ID. </span>
</td>
</tr>
</table>
</center>
</div>
</div>
</body>
</html>
If you want to center it, remove class="submit" and replace it with style="text-align: center;".
That will center the button in the row.
Also for IE, don't forget to specify a DOCTYPE declaration in your markup. Use this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
Related
I'm out of ideas here, but I'm sure I'm missing something obvious. I want the video to float left and the paragraph above the contact form all to float right. The paragraph is cooperating but the form is out there on it's own.
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="description" content- "best=" " junk=" " car=" " buyers=" "
in=" " austin"="">
<meta name="author" content="Lucky">
<title>ATX Junk Cars</title>
<style>
iframe {
clear: left;
float: left;
}
<p> {
float: right;
display: inline-block;
vertical-align: middle;
float: right;
padding-left: 50px;
padding-top: 50px;
}
</style>
</head>
<body>
<h1> ATX Junk Cars &nbs p;
&n bsp;
<hr size="2" width="100%"> </h1>
<iframe src="https://www.youtube.com/embed/dNWh2w5VSn4" allowfullscreen="" width="700" frameborder="0" height="450"></iframe>
<p>If you're ready to turn that old car in your driveway into cash, we want to hear from you. Tell us who you are, how we can reach you, and most important, tell us about that car. For the fastest response, call or send a text to 512-229-5424. If it's 2:00 in the morning or you just don't like phones, send us a message with the form below.</p>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Contact Form</title>
<style>
body {
background-color: #330000;
color: ffcc00;
</style>
<style>
label {
display:block;
margin-top:20px;
letter-spacing:2px;
</style>
<style>
/* Centre the page */
.body {
display:block;
margin:0 auto;
width:576px;
}
/* Centre the form within the page */
form {
margin:0 auto;
width:459px;
}
/* Style the text boxes */
input, textarea {
width:439px;
height:32px;
background:#efefef;
border:1px solid #dedede;
padding:10px;
margin-top:3px;
font-size:0.9em;
color:#3a3a3a;
}
textarea {
height:213px;
background:url(images/textarea-bg.jpg) right no-repeat #efefef;
}
</style>
<header class="body"></header>
<section class="body">
<label>Who are you?</label>
<input name="name" placeholder="Name">
<label>How do we call you?</label>
<input name="phone" placeholder="Phone number with area code" type="phone">
<label>Do you have keys and a clear title?</label>
<input name="keys" placeholder="Keys, title or both?" type="keys">
<label>Does it start, run and drive?</label>
<input name="runs" placeholder="Yes or no?" type="runs">
<label>Anything not working on it?</label>
<textarea name="problems" placeholder="Dents, check engine lights, broken things?"></textarea>
<input id="submit" name="submit" value="Submit" type="submit">
</section>
<footer class="body"></footer>
</body>
</html>
Add style="float:right;" as below:
<section class="body" style="float:right;">
<label>Who are you?</label>
<!-- your form code -->
</section>
I'm having some trouble with using an iframe. So basically I was trying to create a slideshow, with one of the slides being an embedded video, so I did this by using an iframe. Well, the slideshow functions properly, and the video is resized properly, but when the image slides come up, they aren't being enlarged to the size of the iframe like the video is, and they seem to have a padding of 2 or 3px around the top/left sides. I've attached the HTML and CSS code, and took some pictures to illustrate what I'm trying to say and if anyone see's the problem, I'd really appreciate some help. Thanks so much!
CSS CODE
#imageDiv {
border: 5px solid black;
width:500px;
}
#slideshowImg {
width:500px;
height:300px;
margin:0px;
border-spacing:20px;
}
#mediaMenu table {
font-size:14px;
border:0;
margin-top:5px;
border-spacing:0;
}
table {
margin:0;
padding:0;
border-spacing:0
}
#mediaMenu td {
margin:0px;
padding:0px;
width:120px;
height:20px;
color:#CBE8E8;
}
.subMenu img {
width:100%;
height:100px;
}
.subTitle {
font-family:chalkboard, sans-serif;
background-color:#000;
font-size:12px;
}
.subTitle a {
color:#CBE8E8;
text-decoration:none;
}
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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> ******* </title>
<link rel="stylesheet" type="text/css" href="" />
<script language="javascript" type="text/javascript">
slideshowImages = new Array(5);
slideshowImages[0] = new Image();
slideshowImages[0].src = 'images/tebowFinal.jpg';
slideshowImages[1] = new Image();
slideshowImages[1].src = 'images/nash.jpg';
slideshowImages[2] = new Image();
slideshowImages[2].src = 'images/kobe.jpg';
slideshowImages[3] = new Image();
slideshowImages[3].src = 'http://www.youtube.com/embed/9UlmwcEIWUw';
slideshowImages[4] = new Image();
slideshowImages[4].src = 'images/tbrown.jpg';
index=0;
function slideShow(source)
{
document.getElementById('slideshowImg').src = slideshowImages[source].src;
clearInterval(newPic);
index=source;
imageChange();
if (source=="3")
{
onclick=clearInterval(newPic);
}
}
function slideshowForward()
{
// increase the value of index by one or reset the value to 0 if all the slides have been cycled
index++;
if(index >= 5)
{
index=0;
}
// set the image name to the slide show image
document.getElementById('slideshowImg').src = slideshowImages[index].src;
}
function imageChange() {
newPic=setInterval(function(){slideshowForward() },5000);
}
</script>
<link href="slideshow.css" rel="stylesheet" type="text/css" />
</head>
<body onload="imageChange()">
<div id="imageDiv">
<table id="mediaMenu">
<tr>
<td id="imageRow" colspan="5" >
<a href="#" onclick="clearInterval(newPic)">
<iframe id="slideshowImg" src="images/tebowFinalFinal.jpg" frameborder="0" scrolling="no" ></iframe>
</a>
</td>
</tr>
<tr>
<td class="subMenu">
<a href="#" onclick="slideShow(0)">
<table>
<tr> <td class="subTitle"> Tebow Talks </td></tr>
<tr><td><img src="images/tebow.jpg" alt="Tim Tebow"></img></td></tr>
</table>
</a>
</td>
<td class="subMenu">
<a href="#" onclick="slideShow(1)">
<table>
<tr> <td class="subTitle">Nash attack </td></tr>
<tr><td><img src="images/nash.jpg" alt="Steve Nash"></img></td></tr>
</table>
</a>
</td>
<td class="subMenu">
<a href="#" onclick="slideShow(2)">
<table>
<tr> <td class="subTitle">Kobe Who? </td></tr>
<tr><td><img src="images/kobe.jpg" alt="Kobe Bryant"></img></td></tr>
</table>
</a>
</td>
<td class="subMenu">
<a href="#" onclick="slideShow(3)">
<table>
<tr> <td class="subTitle">Not So Giant </td></tr>
<tr><td><img src="images/giants.jpg" alt="San Francisco Giants"></img></td></tr>
</table>
</a>
</td>
<td class="subMenu">
<a href="#" onclick="slideShow(4)">
<table>
<tr> <td class="subTitle">Expensive mistake </td></tr>
<tr><td><img src="images/tbrown.jpg" alt="Terrell Brown"></img></td></tr>
</table>
</a>
</td>
</tr>
</table>
</div>
</body>
</html>
I am facing a layout problem when using overlay inside a td. Let me show my html.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="theme.css">
<script type="text/javascript" src="jquery-1.7.1.js">
</script>
<script type="text/javascript">
function alterControl() {
var $visibleCtrl = $("#servicesTable tbody").find("#ID1").find(".divOverlayVisible");
var $hiddenCtrl = $("#servicesTable tbody").find("#ID1").find(".divOverlayHidden");
$visibleCtrl.removeClass("divOverlayVisible").addClass("divOverlayHidden");
$hiddenCtrl.removeClass("divOverlayHidden").addClass("divOverlayVisible");
}
</script>
</head>
<body>
<table id="servicesTable">
<thead>
<tr>
<th>
<label id="lblServiceName">
Name</label>
</th>
<th>
<label id="lblResult">
Result</label>
</th>
</tr>
</thead>
<tr id="ID1">
<td>
<input style="width: 100px;" id="txtName1" name="txtName1" type="text" value="Service1" />
</td>
<td>
<div class="overlayOuter">
<div id="ServiceTestResult1" class="divOverlayVisible">
<input type="text" value="This is static text" id="Testresult1" style="width: 40px;
height: 16px;" />
</div>
<div id="ServiceTestResultTestImage1" class="divOverlayHidden">
<img src="Validated_16.png" alt="Image not found" style="width: 16px; height: 16px;" />
</div>
</div>
</td>
</tr>
</table>
<input type="button" id="btnToggle" value="Alter" onclick="alterControl()" />
</body>
</html>
My CSS is like below
.overlayOuter
{
position:relative;
height:100%;
width:100%;
}
.divOverlayHidden
{
top:0px;
left:0px;
position:absolute;
visibility:hidden;
z-index:101;
}
.divOverlayVisible
{
top:0px;
left:0px;
position:absolute;
visibility:visible;
z-index:100;
}
The problem that I am facing is, table cell in my second column is getting outside the row. My idea was to show textbox or image at a time based on input. Please find the screenshots too which are uploaded in skydrive
https://skydrive.live.com/#cid=EAA26C1BAE3050B8&id=EAA26C1BAE3050B8!130
https://skydrive.live.com/#cid=EAA26C1BAE3050B8&id=EAA26C1BAE3050B8!131
Can anyone tell me how to solve this problem?
I can't see the images because I'm not member, sorry. But I've recreate the problem in a jsFiddle, and, if I remove position:absolute; from .divOverlayVisible it seems to work properly: Example
.divOverlayVisible {
top:0px;
left:0px;
/*position:absolute; I have removed this line */
visibility:visible;
z-index:100;
}
EDIT: If you need the position to make z_index work, you can change the value absolute to relative rather than remove it.
I'm getting white spaces at the top of my form and I believe I have tried everything but, it's still there. Can someone give some sugesstions at to how to get rid of the white space at the top? When I open the form in firefox it seems to be okay but, when I use IE I get white space. Also, it is a .cfm form. Thanks.
Here is my code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
.body
{
margin-top:0px;
padding-top:0px;
}
.mytable1
{
border-collapse:collapse;
border-color:#000000;
border-style:solid;
border-width:2px;
}
.mytable1 th
{
border-color:#333333;
border-style:solid;
border-width:1px;
}
.mytable1 td
{
border-color:#333333;
border-style:solid;
border-width:1px;
}
.mytable1
{
border-collapse:collapse;
border-color:#000000;
border-style:solid;
border-width:2px;
}
</style>
</head>
<body lang=EN-US style='tab-interval:.5in'>
<div id=Section1>
<cfoutput>
<form name="reportform" action="UpdateFormStatus.cfm" method="post">
<input type="hidden" name="UserEmail" value="#search_review.UserEmail#">
<table class="mytable1">
<tr>
<td valign="top" class="blacktext" align="center" colspan="14"><strong>Review Form</strong></td>
</tr>
<tr>
<td valign="top" class="blacktext" colspan="4"><strong>Type:</strong> #form.Type# </td>
<td valign="top" class="blacktext" colspan="4"><strong>Number: </strong> #form.Number# </td>
</tr>
<cfif not search_results.RecordCount>
<tr>
<td class="blacktextbold" colspan="2"> No results match those criteria.</td>
<td align="left" colspan="1">Search Again</td>
</tr>
<cfelse>
<tr>
<td valign="top" colspan="3" class="blacktext"><strong>Name:</strong> #form.Name# </td>
<td valign="top" colspan="3" class="blacktext"><strong>Project Code: </strong> #form.ProjectCode# </td>
</tr>
</table>
</form>
</cfoutput>
</body>
</html>
You have put body in as a class
is should be:
body{
margin-top:0px;
padding-top:0px;
}
For an ID you use # for a class you use . and if you are going to target an object like a div you just put div
You should put the margin and padding from the html as well to 0 and remove the . from the body selector:
html, body
{
margin-top:0px;
padding-top:0px;
}
It looks like you're missing the closing tag for cfif. The browser is trying to fix your html and is putting this tag above the table. You also don't have a closing tag for the div with id="Section1". CFML is not the same as HTML btw. This will not render properly as HTML because of the Cold Fusion specific tags.
You didn't close the parent div. <div id="Section1"> Also, as #Andrew mentioned, you had body set as a class. (body {} instead of .body{}).
http://jsfiddle.net/fKMHe/
To remove the margin and padding from the form element just add this:
form
{
margin: 0px;
padding: 0px;
}
just have found strange problem in ie7 rendering (may be for previous versions else).
If I have input inside td it create cell with height more then other browsers (ff, ie8, chrome).
All margins are reset, paddings removed, cellcpacing to zeroes. The only possibly way to make them equivalent
that I have found is specify height for all tds in pixels. But it seems to me very ugly.
here is html:
<!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>
<link type="text/css" href="styles/main.css" rel="Stylesheet" />
</head>
<body>
<br />
<table cellspacing="0" cellpadding="0" border="0" class="details-table">
<tr class="details-row">
<td>
<label for="txtFirstName">First Name</label>
</td>
<td>
<label for="txtFirstName">Last Name</label>
</td>
</tr>
<tr class="alt-details-row">
<td>
<label for="txtFirstName">First Name2</label>
<input type="text" class="details-input textField" id="txtFirstName2" name="txtFirstName2" />
</td>
<td>
<label for="txtLastName2">Last Name2</label>
<input type="text" class="details-input textField" id="txtLastName2" name="txtLastName2" />
</td>
</tr>
<tr class="details-row">
<td>
<label for="txtFirstName3">First Name3</label>
<input type="text" class="details-input textField" id="txtFirstName3" name="txtFirstName3" />
</td>
<td>
<label for="txtLastName3">Last Name3</label>
<input type="text" class="details-input textField" id="txtLastName3" name="txtLastName3" />
</td>
</tr>
</table>
</body>
</html>
here is css:
html,
body,
form,
table,
tr,
td
{
margin: 0;
padding:0;
border: 0;
outline: 0;
font-size: 100%;
}
body
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px ;
}
input.textField
{
margin:0px;
padding:0px;
border: 1px solid #BFBFBF;
height: 17px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px ;
}
.details-table
{
width:100%;
color: #666
}
.details-table tr.details-row,
.details-table tr.details-row td
{
background: #ebe4bc;
}
and here is screen shot:
float:left on the elements might help
I don't think you can fix it by changing the height of either td or input element, as there's always 1 offset auto generated for that input in IE7 mode. In IE8 or other popular browsers, the extra 1 offset is not generated.
I think it's a bug in IE7.