?
Solved

Problem with alignment in HTML

Posted on 2007-11-13
8
Medium Priority
?
216 Views
Last Modified: 2012-06-27
I want to align the letter like the below example in html. How do I do it?? I not getting it right.

     (a)  dasdas
   (ab)  sadsad
  (abc) sadsad           < ------------   //This is what I want, align the bullet to the right.
(abcd) sad
//////////////////////////////////////////////////////////////////////////////////////////////
(a)       dasdas
(ab)     sadsad
(abc)   sadsad           < ------------   //This is what I do not want, I do not want like this ! ! !
(abcd) sad

   
0
Comment
Question by:xiaoxin85
[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
8 Comments
 
LVL 3

Expert Comment

by:samalraj
ID: 20278112
Hi,
     you could use like
<table border=0>
<tr>
 <td align="right">(a)</td><td>  dasdas</td>
</tr>
<tr>
 <td align="right">(ab)</td><td>  dasdas</td>
</tr>

<tr>
 <td  align="right">(abc)</td><td>  dasdas</td>
</tr>

<tr>
 <td  align="right">(abcd)</td><td>  dasdas</td>
</tr>
</table>

0
 

Author Comment

by:xiaoxin85
ID: 20278115
is there any way except for table??? I do not want to use a table, is there other right??? like in css???
0
 
LVL 3

Expert Comment

by:samalraj
ID: 20278163
Hi,
     you could do it like this
<ol type="I">
 <li>Apples</li>
 <li>Bananas</li>
 <li>Lemons</li>
 <li>Oranges</li>
 <li>Apples</li>
 <li>Bananas</li>
 <li>Lemons</li>
 <li>Oranges</li>
</ol>

type can be
type="I"
type="i"
type="1"
type="a"
type="A"
 



0
Industry Leaders: 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!

 
LVL 16

Accepted Solution

by:
Kiran Paul VJ earned 1000 total points
ID: 20278195
or like this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style>
.align_right {
      text-align:right;
      width:100px;
      float:left;
}
.align_left {
      text-align:left;
      width:100px;
      float:left;
}
</style>
</head>

<body>
<div class="align_right">(a)</div><div class="align_left"> dasdas</div><br />
<div class="align_right">(ab)</div><div class="align_left"> ddfasdas</div><br />
<div class="align_right">(abc)</div><div class="align_left"> sddas</div><br />
<div class="align_right">(abcd)</div><div class="align_left"> ada</div><br />
</body>
</html>
0
 
LVL 18

Assisted Solution

by:Eternal_Student
Eternal_Student earned 1000 total points
ID: 20279028
This is even better ;-)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
dt{float:left;}
dt span{width:40px; display:block; text-align:right}
dd{padding-left:4px;}
</style>
</head>

<body>
      <dl>
            <dt><span>(a)</span></dt>
            <dd>Black hot drink</dd>
            <dt><span>(ab)</span></dt>
            <dd>White cold drink</dd>
            <dt><span>(abc)</span></dt>
            <dd>White cold drink</dd>            
      </dl>
</body>
</html>
0
 

Author Comment

by:xiaoxin85
ID: 20287246
it is gd but mi need something like if it have more than 1 line, like the 1 below.

     (a)  dasdasdsadsdasdasdasdasd
            dsadasdsadasd
   (ab)  sadsad
  (abc) sadsad          
(abcd) sad
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20558535
Forced accept.

Computer101
EE Admin
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

770 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