• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Breite von tabelle lässt sich einfach nicht ändern!!!

Johnny990

Neues Mitglied
Hi bin am verzweifeln!!!

Die breite meiner Tabelle lässt sich einfach NICHT ändern! sachen wie Hintergrund geht alles, nur die Breite weigert sich.

hier mal mein Code:

PHP:
<?php echo $this->headLink()->prependStylesheet($this->baseUrl().'/css/rechnung.css');?>
<?php include(APPLICATION_PATH.'/views/scripts/rechnung/start.phtml');?>

<h3 class="not_paid">Ausstehende Rechnungen</h3>

<div id="set_count">Es wurden <b><?php echo $this->count;?></b> Datensätze gefunden.</div>

<table class="not_paid" cellspacing="0" cellpadding="10" border="1" >

<tr>
    <th> RNr         </th>
    <th> Name        </th>
    <th> VName       </th>
    <th> Adresse     </th>
    <th> €           </th>
    <th> RDatum      </th>
    <th> <img src="<?php echo $this->baseUrl().'/images/del.png';?>" />    </th>
    <th> <img src="<?php echo $this->baseUrl().'/images/paid.png';?>" /> </th>
    <th> <img src="<?php echo $this->baseUrl().'/images/edit.png';?>" />   </th>
</tr>


<?php foreach($this->rechnungen as $rechnungen) : ?>

<tr class="not_paid">

    <td> <?php echo $this->escape($rechnungen->Rnr);?>     </td>
    
    <td> <?php echo $this->escape($rechnungen->lastName);?>    </td>
    
    <td> <?php echo $this->escape($rechnungen->firstName);?> </td>
    
    <td> <?php echo $this->escape($rechnungen->adress.", "); echo $this->escape($rechnungen->plz." "); echo $this->escape($rechnungen->city);?> </td>
    
    <td id="unbez"> <?php echo number_format($this->escape($rechnungen->betrag), 2, '.', '.');?>  </td>
    
    <td> <?php echo $this->escape($rechnungen->RDatum);?>  </td>
    
    <td>
    <a href="<?php echo $this->url(array('controller'=>'rechnung',
    'action'=>'deleterechnung', 'id'=>$rechnungen->ID, 'backto'=>'getrechnungen'));?>" title="Entfernen">Del</a>
    </td>
    
    <td>
    <a href="<?php echo $this->url(array('controller'=>'rechnung',
    'action'=>'markbezahlt', 'id'=>$rechnungen->ID));?>" title="Als bezahlt markieren">Paid!</a>
    </td>
    
    <td>
    <a href="<?php echo $this->url(array('controller'=>'rechnung',
    'action'=>'edit', 'id'=>$rechnungen->ID));?>" title="Bearbeiten">Edit</a>
    </td>

</tr>

<?php endforeach; ?>

<tr>

<td class ="sum_unbez">Summe</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class ="sum_unbez"><?php echo $this->summe?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>

</tr>

</table>
mein bisheriger css code:
Code:
table.not_paid {    
    border:1px solid lightgray;
    /*funzt nicht!!!!*/
    width:500px;
    }
table.not_paid th {    
    border:1px solid #fee2e2;
    color: red                
    }        
table.not_paid td{    
    border:1px solid #fee24;        
    }
.not_paid th{background-color: #eaebeb;}
table-layout:fixed hab ich schon probiert, jedoch verschiebts mir dann den ganzen Text in der Tabelle
 
Zuletzt bearbeitet:
Normalerweise passt sich die Tabelle und somit der Inhalt an, allerdings nur, wenn es dort auch Leerzeichen gibt, an denen der Text umgebrochen werden kann, sonst bleibt die Spalte so breit, wie der breiteste Inhalt.
 
Zurück
Oben