---
title: "probleme mit display: block;"
url: "https://www.typo3.net/d/13770-probleme-mit-display-block"
source: "typo3.net"
tags: ["Allgemein","Frage"]
created: "2004-07-21"
last_reply: "2004-07-21"
replies: 2
solved: false
page: 1
pages: 1
lang: "de"
---

# probleme mit display: block;

Allgemein · 2 Antworten · gestartet 2004-07-21

## Eröffnungsbeitrag

**ffr_dev** · 2004-07-21 · [Beitrag #1](https://www.typo3.net/d/13770-probleme-mit-display-block/1)

hallo, bei meinem menü, will ich den link nicht nur auf den
text, sondern auf die ganze zelle.
das sieht folgendermassen aus:

```html
<td id="topmenu-right">
   <table border="0" cellpadding="0" cellspacing="0">
      <tr>
         <td class="topmenu-no" onmouseover="this.className = 'topmenu-no-roll'" onmouseout="this.className = 'topmenu-no'">
            <a href="index.php?id=6" onfocus="blurLink(this);" class="top-a-no">ITEM1</a>
         </td>
         <td class="topmenu-no" onmouseover="this.className = 'topmenu-no-roll'" onmouseout="this.className = 'topmenu-no'">
            <a href="index.php?id=5" onfocus="blurLink(this);" class="top-a-no">ITEM2</a>
         </td>
         <td class="topmenu-no" onmouseover="this.className = 'topmenu-no-roll'" onmouseout="this.className = 'topmenu-no'">
            <a href="index.php?id=4" onfocus="blurLink(this);" class="top-a-no">ITEM3</a>
         </td>
         <td class="topmenu-act">
            <a href="index.php?id=2" onfocus="blurLink(this);" class="top-a-act">ITEM4</a>
         </td>
      </tr>
   </table>
</td>
```

und meine css einträge sehen so aus

```typoscript
A.top-a-no{display: block; padding-top: 8px; padding-bottom: 8px;}
A.top-a-act{display: block; padding-top: 8px; padding-bottom: 8px;}
```

mein problem ist, das das ganze nur beim ITEM1 funktioniert.
habe aber keine ahnung wieso, sieht eigentlich alles gleich aus???

## Antworten

### [#2](https://www.typo3.net/d/13770-probleme-mit-display-block/2) · fabian.​schoen · 2004-07-21

Tag,

ich habe es mal schnell getestet und ich sehe da 2 Varianten, die bei mir funktioniert haben. Bin mir natuerlich nicht sicher, wie Standardkonform die sind.

Wenn es ueber Tables loesen willst, dann fuege doch noch eine width hinzu

```typoscript
A.top-a-no{display: block; padding-top: 8px; padding-bottom: 8px; width: 100%;}
```

Sauber finde ich es, wenn anstelle von Tables, DIV nehmen wuerdest

```html
<div> <a href="index.php?id=6" onfocus="blurLink(this);" class="top-a-no">ITEM1</a> 
   </div>
   <div><a href="index.php?id=5" onfocus="blurLink(this);" class="top-a-no">ITEM2</a> 
   </div>
```

gruss
fabian

### [#3](https://www.typo3.net/d/13770-probleme-mit-display-block/3) · ffr_dev · 2004-07-21

vielen dank für die lösungen.
da mein ganzes seiten layout bereits mit tables erstellt ist, fahre ich auch weiterhin auf dieser schiene.

cu

---

Quelle: „probleme mit display: block;“, typo3.net, https://www.typo3.net/d/13770-probleme-mit-display-block
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
