Solved

Problem with alignment in HTML

Posted on 2007-11-13
8
215 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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
LVL 16

Accepted Solution

by:
Kiran Paul VJ earned 250 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 250 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
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 tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

691 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