CSS Table Replacement Question

Giganews Newsgroups
Subject: CSS Table Replacement Question
Posted by:  djayco…@hotmail.com (Dave)
Date: 15 Jun 2004

Hi,

Hopefully someone can help with my little problem.  I am looking to
have replace a common table but am having trouble with the alignment.

I want to have 2 "columns" of information held within the parent <div>
as follows:

--------------------
|    col1      col2|
|                    |
|    col1      col2|
|    col1      col2|
|    col1      col2|
--------------------

What I am getting is the following:

--------------------
|    col1col2      |
|                    |
|    col1col2      |
|    col1col2      |
|    col1col2      |
--------------------

I am using the following code where col1 = .label and col2=.data

<html>
    <style>
        #Hrs2 { position:absolute; left:1; top:15; width:200;
background-color:white; font-size: 11px; color: #333366;
padding:5px;border: 1px solid #333366; text-align: left; z-index:52; }

    #Hrs2 .label      {font-size: 11px;  color: #666666;  font-weight:
normal; text-align: right; display:inline;}
    #Hrs2 .data        {font-size: 11px;  color: #990000;  font-weight:
bold;  text-align: right; display:inline; position:relative;}
    #Hrs2 .monthLabel  {font-size: 12px;  color: #666666;  font-weight:
bold;  margin: 5px, 0px, 5px, 0px;}

    </style>
    <body>
        <div id="Hrs2">
            <div class="label">Total for 2004-04-10 :</div>
            <div class="data">12.25</div>
            <div class="monthLabel">June Information:</div>
            <div class="label">Expected :</div>
            <div class="data">200</div>
            <div></div>
            <div class="label">minus Worked :</div>
            <div class="data">150.00</div>
            <hr>
            <div class="label">Balance :</div>
            <div class="data">50.25</div>
        </div>
    </body>
</html>

Thanks in advance.

Dave

Replies