Solved

How to align table

Posted on 2003-10-29
5
227 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
Comment Utility
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
Comment Utility
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
Comment Utility
Hi,
 what does  z-index means?,

Thanks , both solution was wonderful.

Thanks and  God bless you
0
 

Author Comment

by:Jasbir21
Comment Utility
Hi,
  both answers are accepted answers with Grade A.

Thanks
0
 
LVL 31

Expert Comment

by:seanpowell
Comment Utility
>>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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses four methods for overlaying images in a container on a web page
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 videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

762 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

6 Experts available now in Live!

Get 1:1 Help Now