Here is my HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
        <style type="text/css">
            #homeLinks {
                width: 500px;
                text-align: center;
            }

            #copyright {
                float: right;
            }
        </style>
    </head>
    <body>
        <div align="center">
            <div id="homeLinks" align="center">
                <a href="">Home</a>
                 -
                <a href="">About Us</a>
                 -
                <a href="">Contact Us</a>
                 -
                <a href="">Login</a><br/>
                <a href="">Random</a>
                 -
                <a href="">Random</a>
                 -
                <a href="">Random</a>
                 -
                <a href="">Random</a>
                <br/>
                <a href="">Random</a>
            </div>
            <div id="copyright">
                &copy; 2010 William B. Meyer, Inc.
            </div>
            <div class="clear"></div>
        </div>
    </body>
</html>

I want the Copyright DIV to be aligned with the top of the "homeLinks" DIV, but everything I try, the Copyright DIV - while correctly floated right - is actually below the the other DIV. How do I get it to vertically align?

1 answer

1
point

Try floating your #homeLinks div to the left.

Answered about 6 years ago by webcodeslinger