Solved

How to align table

Posted on 2003-10-29
5
229 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
html coding on my Tumblr blog 1 34
Angular 2 - Issue in page Layout 2 46
Issue in webpage 6 33
Why my select dropdown does not work? 8 20
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

947 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

21 Experts available now in Live!

Get 1:1 Help Now