John Dick wrote:
> I have the following style in my CSS:
>
> body {
> margin: 0;
> padding: 0;
> border: 0;
> }
> #ad {
> width: 275px;
> height: 275px;
> margin-top: 0;
> margin-bottom: auto;
> border: 5px black double;
> background-color: red;
> text-align: center;
> vertical-align: middle;
> font-family: Arial, Helvetica, sans-serif;
> font-size: 275%;
> font-weight: bolder;
> color: blue;
> }
>
> The basic html is:
>
> <div id="ad">
> Our business is tax.
> </div>
>
> Now if I view this in browsers (IE8, FF 3.6.3), the text isn't vertically
> aligned. However, if I put the text within tags (like: <p>Our business is
> tax.</p> the text appears to be vertically aligned. Changing the font size
> to 100% again does not align. What is the trick here to get the text
> horizontally as well as vertically to be aligned?
>
> Thank you in advance for any advise on this.
>
>
It ain't easy. Please see:
<http://chelseacreekstudio.com/ca/cssd/va.html>
Cursory checked in FF, Safari, Opera, IE/8. Not corrected for IE/6 or IE/7.
Based on code by Georg Sortun
<http://www.gunlaug.no/contents/wd_additions_20.html>
Best,
~d
--
desktop
http://chelseacreekstudio.com/
______________________________________________________________________
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/