Solved

How to align table

Posted on 2003-10-29
5
232 Views
Last Modified: 2010-04-09
Hi,
  i am new to html and i am facing a problem.

I have put check boxes or radio buttons in tables.

But how do i put it in a way , it is at the exact point that i want to

If i use align-right, its to right, if left, too left and so one

 Education :
                 |The table should be at this point


This is my code:
<table border="0">
<tr>
<td >
<input type="radio" name="edu" value="Pri" style="background=cornsilk; border=0;">Primary School<br>
<input type="radio" name="edu" value="Sec" style="background=cornsilk; border=0;">Secondary School<br>
<input type="radio" name="edu" value="Uni" style="background=cornsilk; border=0;">University
</td>
</tr>
</table>



Thanks
0
Comment
Question by:Jasbir21
  • 2
  • 2
5 Comments
 

Assisted Solution

by:kate99
kate99 earned 40 total points
ID: 9641863
Hi Jasbir21,

Put the table in a layer and then you can position it wherever you want:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 40; top: 80;">
<table border="0">
<tr>
<td >
<input type="radio" name="edu" value="Pri" style="background=cornsilk; border=0;">Primary School<br>
<input type="radio" name="edu" value="Sec" style="background=cornsilk; border=0;">Secondary School<br>
<input type="radio" name="edu" value="Uni" style="background=cornsilk; border=0;">University
</td>
</tr>
</table>
</div>
</body>
</html>

0
 
LVL 31

Accepted Solution

by:
seanpowell earned 40 total points
ID: 9642290
Or this:
<table border="0" style="margin-left:100px;">
<tr>
<td >
<input type="radio" name="edu" value="Pri" style="background=cornsilk; border=0;">Primary School<br>
<input type="radio" name="edu" value="Sec" style="background=cornsilk; border=0;">Secondary School<br>
<input type="radio" name="edu" value="Uni" style="background=cornsilk; border=0;">University
</td>
</tr>
</table>
0
 

Author Comment

by:Jasbir21
ID: 9642495
Hi,
 what does  z-index means?,

Thanks , both solution was wonderful.

Thanks and  God bless you
0
 

Author Comment

by:Jasbir21
ID: 9642533
Hi,
  both answers are accepted answers with Grade A.

Thanks
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9642663
>>what does  z-index mean?
It lets the browser layer elements on top of one another:

Elements with a "higher" number will be rendered "on top" of elements with a lower one.

<html>
<head>
</head>
<body>
<div style="position:absolute; top:50px; left:50px; background-color:blue; width:200px; height:100px; z-index:1;"></div>
<div style="position:absolute; top:75px; left:75px; background-color:red; width:100px; height:50px; z-index:2;"></div>
</body>
</html>
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

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 overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

809 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