1 reply [Last post]
bluprint
bluprint's picture
Offline
newbie
south Africa
Last seen: 9 years 33 weeks ago
south Africa
Timezone: GMT+2
Joined: 2013-04-18
Posts: 1
Points: 2

Good day,

I am trying to make a table using div and css only. My first table workd perfectly, My second table is not looking the way It should . I know it is something simple but after two hours I am still at a loss.

This is the link to the page i am working on

here is the html for both the tables

<div class="divTable1">
<div class="headRow">
<div class="divCell" align="center"><p>Companies</p></div>
<div  class="divCell" align="center"><p>EME</p></div>
<div  class="divCell" align="center"><p>QSE</p></div>
<div  class="divCell" align="center"><p>Generic</p></div>
</div>
<div class="divRow">
<div class="divCell"><p>Turnover</p></div>
<div class="divCell"><p> than R5 mil</p></div>
<div class="divCell"><p>>R5 mil < than R35 mil</p></div>
<div class="divCell"><p>> than R35 mil</p></div>
</div>
<div class="divRow">
<div class="divCell"><p>Maks.points earned</p></div>
<div class="divCell"><p>25</p></div>
<div class="divCell"><p>25</p></div>
<div class="divCell"><p>5</p></div>
</div>
<div class="divRow">
<div class="divCell"><p>NPAT to be invested</p></div>
<div class="divCell"><p>1%</p></div>
<div class="divCell"><p>1%</p></div>
<div class="divCell"><p>1%</p></div>
</div>
 
</div>
 
<div id="txtparra2">
<p>At the time of  rating, the rating agency will need to confirm the following supporting evidence.</p>
</div>
 
<div id="divTable2">
<div class="headRow2">
<div class="divCell2" align="center"><p>Area being validated </p></div>
<div  class="divCell2" align="center"><p>Proof of payment</p></div>
<div  class="divCell2" align="center"><p>Proof that 75% or more of beneficiaries are black</p></div>
</div>
<div class="divRow2">
<div class="divCell2"><p>Supporting Evidence</p></div>
<div class="divCell2"><p>Invoice From Intellikidz</p></div>
<div class="divCell2"><p>Confirming letter from beneficiary school</p></div>
</div>

and this is the css code used

.divTable1
    {
        display:  table;
        width:100%;
        border:1px solid  #666666;
        border-spacing:5px;
    }
 
    .divRow
    {
       display:table-row;
       width:auto;
 
    }
 
    .divCell
    {
        float:left;
        display:table-column;
        width:24.5%;
	border:1px solid  #666666;
	font-size-adjust:.35;
 
    }
	txtparra2{
		clear:left;
		}
 
.divTable2
    {
        display:  table;
        width:100%;
        border:1px solid  #666666;
        border-spacing:5px;
    }
 
    .divRow2
    {
       display:table-row;
       width:33.3%;
 
    }
 
    .divCell2
    {
        float:left;
        display:table-column;
        width:33.3%;
	border:1px solid  #666666;
	font-size-adjust:.35;
 
    }

Any help would be appreciated

Regards

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 20 hours 43 min ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

why? It's ok to use tables

why?
It's ok to use tables for tabular data like this.