Tuesday, August 20, 2013

CSS table position caption

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
caption {caption-side:bottom}
</style>
</head>

<body>

<table border="1">
<caption>This is a caption</caption>
<tr>
<td>Munirul</td>
<td>Hasan</td>
</tr>
<tr>
<td>Shahin</td>
<td>Tuhin</td>
</tr>
</table>

<p><b>Note:</b> Internet Explorer supports the caption-side property only if a !DOCTYPE is specified!</p>
</body>
</html>

Result


No comments: