• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Why one of the control is way to the right/

Hi, I'm using asp.net 3.5
I was trying to use table to line up the controls but the one on the right is way off. How can I correct this?  Thank you.
OffAligh.jpg
ManageAccounts.aspx
0
lapucca
Asked:
lapucca
  • 2
2 Solutions
 
F IgorDeveloperCommented:
you can change the fixed margins defined in the CSS code in aspx:

        #lsAdmin
        {
              margin-left: 7in;
        }
        #btnCreateAccount
        {
              margin-left: 7in;
              margin-top: .5in;
        }

or use the value that fits better to the layout
0
 
AmickCommented:
Use CSS to position items as you need them.  Here's a quick mockup of the top of your page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta name="Author" content="?">
<meta name="Keywords" content="?">
<meta name="Description" content="?">
<style type="text/css">
#in1{margin-left:2%;}
#in2{margin-left:48%;}
</style>
</head>

<body>
<center>
<h2><u>Create a new patient account</u></h2>
</center>

<p align="left">
<form>
<span id="in1"> Study ID: <input type="text" name="StudyID" />
 </span>
<span id="in2">
First Office Visit Date: <input type="text" name="FOVdate" />
</span>
 </form> 
</p>
</body>
</html>

Open in new window


You can learn more on CSS Positioning at this link.
0
 
lapuccaAuthor Commented:
I found the reason, I need to add colspa="2" for the row before it.  Attached is a screen captrue of what i have now using IE developer tool to show the table cells and the current code.  I still need help to style this:
1  how can I get the table to center in the Div?
2.  I would like content of each table cell to be vertical align to be center, horizontonal align to be left.  I would also like some padding all around the cell for the content, padding like it shows for "first office visit" cell
Thank you.
table-Cell.jpg
ManageAccounts.aspx
0
 
lapuccaAuthor Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now