Solved

How to align table

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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…

636 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