Login | Register | FAQ
Anonymous

html help need

+ Post a reply

1, 2


html help need

by needassitance1 » Mon Jun 13, 2011 7:43 am

Hi all,

I want to align blue pic and assignment # 3 txt in center of window,when i open it in Firefox it seems fine but in IE its alignment in left i want to align both highlighted in print screen in in center.
Check attached source code and my print screen


Please please reply must.


Thanks in advance.

Attachments

  1. help.JPG (100.43 KiB) Downloaded 762 times

User avatar

needassitance1

  • Posts: 9
  • Joined: Mon Jun 13, 2011 7:36 am

Re: html help need

by needassitance1 » Mon Jun 13, 2011 7:46 am

here is my source code

<html>
<head>
<script language="javascript" type="text/javascript">
function formValidation()
{
var a = document.frm.n1.value.length;
var b = document.frm.n3.value.length;
var c = document.frm.n5.value.length;
var o = document.frm.s1.selectedIndex;
if(a < 1)
{
alert("Please fill 'Name' field properly");
document.frm.n1.focus();
return false;
}
else if((b < 6) || (b>8))
{
alert("password muste be between 6 to 8");
document.frm.n3.focus();
return false;
}
else if(c<1)
{
alert("please fill address field properly");
document.frm.n5.focus();
return false;
}
else if(document.frm.female.value.checked)
{
alert("male must be selected");
return false;
}
else if(document.frm.female.checked)
{
alert("male must be selected");
return false;
}
else if(o !=2)
{
alert("islamabad must be selected");
return false;
}
else
{
return true;
}

}

function oncheckedproperty()
{
if(document.frm.female.checked)
{
document.frm.female.checked = false;
}
else if(document.frm.masle.checked)
{
document.frm.male.checked = false;
}


}




function copyOnetoAnother()
{
document.frm.n2.value = document.frm.n1.value;
document.frm.n4.value = document.frm.n3.value;
document.frm.n6.value = document.frm.n5.value;

}


function yakki()
{
var a = document.frm.s1.selectedIndex;
if(a==1)
{
document.frm.selectedText.value ="Virtual University Campus (SHADMAN), Lahore 1st Floor 1-Shadman Market Shadman";

}
else if(a==2)
{
document.frm.selectedText.value ="Virtual University Campus, Multan 23/3, Officers Colony, 2nd & 3rd Floor, Near Chungi No. 9, Bosan Road, Multan";

}
else if(a==3)
{
document.frm.selectedText.value ="Virtual University Campus, Islamabad. 9-E, Rizwan Plaza, Blue Area, Islamabad.";

}
else if(a==4)
{
document.frm.selectedText.value ="Virtual University Campus, Karachi A-21, KCHS, Near Duty Free Centre, Baloch Colony Bus Stop, Karachi";

}
else if(a==5)
{
document.frm.selectedText.value ="Virtual University Campus, Peshawar 8-Jamrud Road, P.O. Tehkal Bala, Adjacent Toyota Froniter Motors, Peshawar.";
}



}

function checkvalue()
{
if(document.frm.n7.checked)
{
document.frm.n10.checked = true;
}
else
{
document.frm.n10.checked = false;
}

if(document.frm.n8.checked)
{
document.frm.n11.checked = true;
}
else
{
document.frm.n11.checked = false;
}
if(document.frm.n9.checked)
{
document.frm.n12.checked = true;
}
else
{
document.frm.n12.chBlue = false;
}

}


</script>
</head>
<TITLE>Assignment 3</TITLE>
<table style="margin: auto;">
<body bgcolor="white">
<table style="margin: auto;"><body onunload="dontcloseme()">
<form name="frm" method="post" action="http://bookshop.vu.edu.pk/">
<table border="1" bordercolor="white" align="center" bgcolor="white">
<tr>
<td align="center" valign="center" width="100" colspan=3><table style="margin: auto;">
<a href="http://vulms.vu.edu.pk/" target="_blank"><img src="http://www.logix.edu.pk/images/vu_logo.png" onclick="moveon()"></td></tr><tr><td align="center" valign="center" width="100%" colspan=3><font size="+2"><b>Assignment # 3 CS101 Spring 2011</b></font></font></td>
</tr>
</table>
<table style="margin: auto;">
<table width="50" height="50"border="1" bordercolor="blue"bgcolor="WHITE" ><tr>
<td align="right" valign="center" width="20%"> Name:</td>
<td><input type="text" name="n1" size="50%" onkeyup="copyOnetoAnother()"/></td>
<td><input type="text" name="n2" size="50%" disabled/></td>
</tr>
<tr>
<td align="right" valign="center" width="10%" maxlength="6"> Password:</td>

<td><input type="password" name="n3" size="50%" onkeyup="copyOnetoAnother()"/></td>
<td><input type="password" name="n4" size="50%" disabled/></td>
</tr>

<tr>
<td> Address:</td>
<td><textarea name="n5" size="50%" cols=40 rows=6 onkeyup="copyOnetoAnother()"></textarea></td>
<td><textarea name="n6" size="50%" cols=40 rows=6 disabled></textarea></td>

</tr>
<tr>
<td> Gender:</td>

<td align="LEFT"><input type="radio" value="Male" name="male" onclick="oncheckedproperty()">Male</input>
<input type="radio" value="Male" name="female" onclick="oncheckedproperty()" checked>Female</input></td>
</tr>

<tr>
<td align="RIGHT" valign="center" width="20%"> Hobbies:</td>
<td align="LEFT" valign="center" width="40%"><input type="checkbox" name="n7" size="50%" onClick="checkvalue()">Playing Cricket</input><br>

<input type="checkbox" name="n8" size="50%" onClick="checkvalue()">Surfing Internet</input><br>
<input type="checkbox" name="n9" size="50%" onClick="checkvalue()">Rading Books</input>
</td>

<td align="LEFT" valign="center" width="40%"><input type="checkbox" name="n10" size="50%" disabled>Playing Cricket</input><br>
<input type="checkbox" name="n11" size="50%" disabled>Surfing Internet</input><br>
<input type="checkbox" name="n12" size="50%" disabled>Rading Books</input>

</tr>
<tr>
<td align="right" valign="center" width="20%"> Location:</td>

<td align="LEFT" valign="LEFT" width="40%"><select name="s1" onchange="yakki()">
<option value="0">Select Location</option>
<option value="1">Lahore</option>
<option value="2">Islamabad</option>

<option value="3">Karachi</option>
<option value="4">Multan</option>

<option value="5">Peshawar</option></select></td>
<td align="center" valign="center" width="100%"><TEXTAREA NAME="selectedText" ROWS=5 COLS=45 disabled></textarea></td>
</tr>
<tr>
<td align="right" valign="center" width="20%"> </td>

<td><input type="submit" onclick="return formValidation()" value="submit"/><input type="reset"/></td>
</tr>

</table>
</form>
</body>
</html>
User avatar

needassitance1

  • Posts: 9
  • Joined: Mon Jun 13, 2011 7:36 am

Re: html help need

by HTML.net » Mon Jun 13, 2011 8:11 am

Try to change this part:

Code: Select all
</head>
<TITLE>Assignment 3</TITLE>
<table style="margin: auto;">
<body bgcolor="white">
<table style="margin: auto;"><body onunload="dontcloseme()">
<form name="frm" method="post" action="http://bookshop.vu.edu.pk/">
<table border="1" bordercolor="white" align="center" bgcolor="white">
<tr>
<td align="center" valign="center" width="100" colspan=3><table style="margin: auto;">
<a href="http://vulms.vu.edu.pk/" target="_blank"><img src="http://www.logix.edu.pk/images/vu_logo.png" onclick="moveon()"></td></tr><tr><td align="center" valign="center" width="100%" colspan=3><font size="+2"><b>Assignment # 3 CS101 Spring 2011</b></font></font></td>
</tr>
</table>
<table style="margin: auto;">


to:

Code: Select all
<TITLE>Assignment 3</TITLE>
</head>
<body bgcolor="white" onunload="dontcloseme()">
<form name="frm" method="post" action="http://bookshop.vu.edu.pk/">
<a href="http://vulms.vu.edu.pk/" target="_blank"><img src="http://www.logix.edu.pk/images/vu_logo.png" onclick="moveon()" style="float: left; padding-right: 15px;"></a><h2>Assignment # 3 CS101 Spring 2011</h2>
<table style="margin: auto; clear:both">



But your code is a bit messy. I think you it would be a great benefit for you to use a couple of hours and read the HTML tutorial: http://html.net/tutorials/html/introduction.php to get the foundation right.

All the best,

Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1184
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: html help need

by needassitance1 » Mon Jun 13, 2011 9:13 am

HTML.net wrote:Try to change this part:

Code: Select all
</head>
<TITLE>Assignment 3</TITLE>
<table style="margin: auto;">
<body bgcolor="white">
<table style="margin: auto;"><body onunload="dontcloseme()">
<form name="frm" method="post" action="http://bookshop.vu.edu.pk/">
<table border="1" bordercolor="white" align="center" bgcolor="white">
<tr>
<td align="center" valign="center" width="100" colspan=3><table style="margin: auto;">
<a href="http://vulms.vu.edu.pk/" target="_blank"><img src="http://www.logix.edu.pk/images/vu_logo.png" onclick="moveon()"></td></tr><tr><td align="center" valign="center" width="100%" colspan=3><font size="+2"><b>Assignment # 3 CS101 Spring 2011</b></font></font></td>
</tr>
</table>
<table style="margin: auto;">


to:

Code: Select all
<TITLE>Assignment 3</TITLE>
</head>
<body bgcolor="white" onunload="dontcloseme()">
<form name="frm" method="post" action="http://bookshop.vu.edu.pk/">
<a href="http://vulms.vu.edu.pk/" target="_blank"><img src="http://www.logix.edu.pk/images/vu_logo.png" onclick="moveon()" style="float: left; padding-right: 15px;"></a><h2>Assignment # 3 CS101 Spring 2011</h2>
<table style="margin: auto; clear:both">



But your code is a bit messy. I think you it would be a great benefit for you to use a couple of hours and read the HTML tutorial: http://html.net/tutorials/html/introduction.php to get the foundation right.

All the best,

Andreas, HTML.net

Attachments

  1. quite closer result.JPG (51.53 KiB) Downloaded 752 times
    result file.
    Please tell me how i can do it? plus tell me is there any comprehensive video tutorial on your web throuhg i can learn java,html,xhtml,php,asp.because i need to learn all these

  2. after replace.JPG (98.96 KiB) Downloaded 751 times
    now its in this shape and i need it quite closer to my quite closer to result file.mean no need to change in color but i need to set table pic in the center of page

User avatar

needassitance1

  • Posts: 9
  • Joined: Mon Jun 13, 2011 7:36 am

Re: html help need

by needassitance1 » Mon Jun 13, 2011 9:18 am

Thanks for your advice sure i am spending my time and i hope its more beneficial for me as well
User avatar

needassitance1

  • Posts: 9
  • Joined: Mon Jun 13, 2011 7:36 am

Re: html help need

by needassitance1 » Mon Jun 13, 2011 9:33 am

hmmmmmm waooooo print screen in tutorial are nic
User avatar

needassitance1

  • Posts: 9
  • Joined: Mon Jun 13, 2011 7:36 am

Re: html help need

by HTML.net » Mon Jun 13, 2011 10:18 am

If you want it like the first picture, try this:

Code: Select all
<TITLE>Assignment 3</TITLE>
</head>
<body bgcolor="white" onunload="dontcloseme()">
<form name="frm" method="post" action="http://bookshop.vu.edu.pk/">
<div style="text-align:center;">
<a href="http://vulms.vu.edu.pk/" target="_blank"><img src="http://www.logix.edu.pk/images/vu_logo.png" onclick="moveon()"></a><h2>Assignment # 3 CS101 Spring 2011</h2>
</div>
<table style="margin: auto;">


Good luck with the tutorials. You should start with HTML, then CSS and then PHP...

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1184
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: html help need

by needassitance1 » Mon Jun 13, 2011 10:28 am

waoo thats great.Its same as like as i need it,Thanks for your cooperation.

Thanks
User avatar

needassitance1

  • Posts: 9
  • Joined: Mon Jun 13, 2011 7:36 am

Re: html help need

by needassitance1 » Mon Jun 13, 2011 10:31 am

what do you think till how much time i could be able to make html file as per my need from all these tutorials?.I like print screens which helps me to understand very well. Thanks admin
User avatar

needassitance1

  • Posts: 9
  • Joined: Mon Jun 13, 2011 7:36 am

Re: html help need

by HTML.net » Mon Jun 13, 2011 10:34 am

You can learn basic HTML and CSS in a couple of weeks. It takes longer to become an expert - but you can always help and direction here at HTML.net :)

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1184
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.


+ Post a reply

1, 2