Posted by Ed Jay on 08/18/05 11:20
Mark Parnell <webmaster@clarkecomputers.com.au> wrote:
>Previously in alt.html, Ed Jay <edMbj@aes-intl.com> said:
>
>> I'm having a heck of a time figuring out how to center text or boxes.
>
>http://dorward.me.uk/www/centre/
Thanks, Mark. That was a great help.
Allow me to impose and ask another question. I'm trying to center a box
with text aligned both left and right. Example:
Test1 Test2
I defined a simple box as:
..menu {
border: 1px solid black;
margin-left: auto;
margin-right: auto;
width: 300px;
}
The code on my page is:
<div class=menu style="text-align: left;">Test1<div
style="text-align:right;">Test2</div></div>
The result is:
Test1
Test2
Why?
Ed Jay (remove M to respond)
[Back to original message]
|