On 6/13/10 5:17 PM, David Laakso wrote:
> John Dick wrote:
>> I have the following style in my CSS:
>>
[code snipped and amended below]
>>
>> Now if I view this in browsers (IE8, FF 3.6.3), the text isn't vertically
>> aligned. ...
>>
>> Thank you in advance for any advise on this.
>>
Here is another possibility. But you will likely need to make the width
of the #ad ems rather than pixels to accommodate larger than "normal"
text sizes, or the text will wrap and not be centered. (But it degrades
quite well, IMHO.)
#ad {
width: 275px; /* change to em sized width */
height: 275px; /* change to 138px (half) */
margin-top: 0; /* change to padding-top 137px */
margin-bottom: auto; /* ? */
border: 5px black double;
background-color: red;
text-align: center;
/* vertical-align: middle; delete */
font-family: Arial, Helvetica, sans-serif;
font-size: 275%;
line-height: 1; /* add */
font-weight: bolder;
color: blue;
}
#ad div {
margin-top: -.5em;
}
HTML
<div id="ad">
<div>Our business is tax.</div>
</div>
Cordially,
David
--
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/