Solved

How to align table

Posted on 2003-10-29
5
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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…

739 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