I have a simple code segment, and I am trying to figure our why the text wont centre on its background. Its probably a css issue, but I cannot understand why its not working.
The red text should be centred on the grey background - see -
And the css is:
Can anyone see what is hopefully a simple mistake. I am trying to use text-align center on the title class to get the text centred.
The red text should be centred on the grey background - see -
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="test-wrap.css" rel="stylesheet" type="text/css">
<title>Untitled Document</title>
</head>
<body>
<table cellspacing="0" class="offer">
<tr>
<td colspan="3">
<div class="offtitle">
<span class="title">test text</span>
</div>
</td>
</tr>
</table>
</body>
</html>
And the css is:
Code:
div.offer1{
overflow: auto;
width: 874px;
border: 1px solid #DDDDDD;
margin-top: 10px;
background: #F4F3EE !important;
/*display: table !important; */
}
table.t874{
width: 874px;
/*margin: 0px 63px 0px 63px !important;*/
}
table.t874 td{
border: 0px;
padding: 0px;
line-height: 16px;
font-size: 11px !important;
}
div.offtitle{
width: 874px;
height: 24px;
background: url(offertitle.gif) top left no-repeat;
margin-top: 10px ;
}
.ref24{
margin: 0px 6px 0px 15px;
line-height: 24px !important;
font-weight: bold;
float: left;
}
.title{
line-height:24px !important;
font-weight: bold;
color: #CD4527;
float: left;
font-size: 11px !important;
text-align: center;
}
table.offer{
width: 874px;
border: 0px;
padding: 0px;
}
table.offer td{
vertical-align: center;
}
Can anyone see what is hopefully a simple mistake. I am trying to use text-align center on the title class to get the text centred.