Solved

Simple Question on div

Posted on 2011-09-26
5
169 Views
Last Modified: 2012-05-12
I have a form which displays class information. So the form should look something like this :-

Name                        Information
not found                   not found

But when i use the above  code it outputs them very close to each other like this :-

Name      Information
not found not found

If the name of the person is long and the information is long then everything works fine but when the name is short and the information is short then the form looks like this :-

Name                  Information
Testiing               this is not
123                      nice and i

Can anyone tell me what do i need to do to fix it ?. I just want to look like this :-

Name                                   Information
Testing 12345                      This is great and i am ready to do something very special
                                              someday. testing....
<table>
		<tr>
			<td ><b>Name</b><br />
				<div align="left" style="width: 100%;">
					not found
				</div>
			</td>
			<td><b>Information</b><br />
				<div align="right" style="width: 100%;">
					not found
				</div>
			</td>
		</tr>
	</table>

Open in new window

0
Comment
Question by:Micheal_Male
5 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 36707622
Keep Title and Information in Different TD and remove div tag. See below example.

<tr>
<td width="100%">
   <b>Name</b>
</td>
<td style="align:left" width = "100%">
   Not Found
</td>
</tr>

0
 

Author Comment

by:Micheal_Male
ID: 36707666
I don't think that is correct. My title is on left side and the Not found is all the way on the right.
0
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 42 total points
ID: 36707801
Use attached code like.
<html><body>
<table>
<tr>
<td width="50%">
   <b>Name</b>
</td>
<td width = "50%">
  <b>Information required</b>
</td>
</tr>
<tr>
<td style="align:left" width="50%">
    Not Found
</td>
<td style="align:left" width = "50%">
   Not Found
</td>
</tr>
</table>
</body>
</html>

Open in new window

0
 
LVL 17

Assisted Solution

by:sonawanekiran
sonawanekiran earned 41 total points
ID: 36707869
If you don't want to change your html then try this
<table width="100%">
    <tr>
      <td width="50%"><b>Name</b><br />
        <div align="left" style="width: 100%;">
          not found
        </div>
      </td>
      <td><b>Information</b><br />
        <div align="left" style="width: 100%;">
          not found
        </div>
      </td>
    </tr>
  </table>

Open in new window

0
 
LVL 5

Assisted Solution

by:eridanix
eridanix earned 42 total points
ID: 36707938
<table>
      <tr>
            <td width="200px"><b>Name</b><br />
                  <div style="float:left;">
                        not found
                  </div>
            </td>
            <td width="200px"><b>Information</b><br />
                  <div style="float:left;">
                        not found
                  </div>
            </td>
      </tr>
</table>

or if table have to be over whole page:

<table width="100%">
      <tr>
            <td width="50%"><b>Name</b><br />
                  <div style="float:left;">
                        not found
                  </div>
            </td>
            <td width="50%"><b>Information</b><br />
                  <div style="float:left;">
                        not found
                  </div>
            </td>
      </tr>
</table>
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
Login area of a page 4 32
Angular 2 - Issue in page Layout 2 47
Tags from access to excel 3 28
Not seen Link button 5 14
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…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 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

23 Experts available now in Live!

Get 1:1 Help Now