---
title: "om caption"
type: "forum-thread"
url: "https://www.webforum.nu/amne/html-css/156259-om-caption"
topic: "HTML & CSS"
topic_url: "https://www.webforum.nu/amne/html-css"
author: "tanten"
published: "2007-01-21T11:57:09.000Z"
updated: "2007-01-21T13:18:45.000Z"
replies: 2
views: 402
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/html-css/156259-om-caption"
---

# om caption

## #1 — tanten, 2007-01-21T11:57Z

Försöker få caption att lägga sig under table, men efter mycket provande hit och dit så tog jag w3:s eget exempel och försökte. [W3-exempel](http://www.w3.org/TR/CSS21/tables.html#propdef-caption-side)
Ingenting fungerar i IE... 

```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>tabell</title>

<style type="text/css">
<!--
th { text-align: center; font-weight: bold;
vertical-align: baseline; }
td { vertical-align: middle; }
table   { border-collapse: collapse; width:15em; }
tr#row1 { border: 3px solid blue; }
tr#row2 { border: 1px solid black; }
tr#row3 { border: 1px solid red; }
caption { caption-side: bottom; width: auto; text-align: center; }
-->
</style></head>
<body>
<table>
<caption>This is a simple 3x3 table</caption>
<tr id="row1">
   <th>Header 1</th>  <td>Cell 1</td>  <td>Cell 2</td></tr>
<tr id="row2">
   <th>Header 2</th>  <td>Cell 3</td>  <td>Cell 4</td></tr>
<tr id="row3">
   <th>Header 3</th> <td>Cell 5</td>  <td>Cell 6</td></tr>
</table>
</body>
</html>
```

  

Vad gör jag för fel? Eller tolkar jag W3 fel?
FF lägger caption rätt och ritar border.
IE6 gör ingenting.
  :q

Permalänk: https://www.webforum.nu/p/156259

## #2 — icaaq, 2007-01-21T12:46Z

Enligt <http://www.aurora-il.org/table_test.htm> och under Ex 3.0 - Caption placement så står det följande, 

> Firefox 1.0 and Netscape 7.2 correctly position the caption according to this assigned value. In Example 3a below, the caption-side value has been set to bottom. If you're viewing this in Internet Explorer 6 or Opera 7.54, the caption is still at the top, since both of these browsers ignore the caption-side completely, always placing the caption at top. \[Note that the -1px left margin on the caption has been removed here so that Opera will show the caption.\]

mv icaaq

Permalänk: https://www.webforum.nu/p/1925316

## #3 — tanten, 2007-01-21T13:18Z

Åh...tack för den länken... Mycket bra läsning!
Men då får jag tänka ut någon annan lösning då...

Permalänk: https://www.webforum.nu/p/1925325

---

Tråden på webben: https://www.webforum.nu/amne/html-css/156259-om-caption
