DrinkJavaCodeJava
DrinkJavaCodeJava

Reputation: 808

Can't align link next to p in footer

Right now I am trying to align my links next to a p in the footer. For some reason all the links in the nav aligned easily however when I try to put a link next to the p in the footer. The link goes to the bottom. I have tried making my footer inline, I have tried different position methods, and I have tried floats. However making the footer inline-block did slightly improve the situation by getting rid of the ugly white stripe below. But I still need to get the link to align right. Here is the html code for my footer

<div id="footer">

          <p><b>Copyright 2011 Hometown Bank, Inc.</b></p>
          <a href="google.com">Privacy Policy</a>
</div>

Here is the css for the footer.

#footer
        {
            spadding-top: 1px;
            height: 7%;
            background-color:#CCDDEE;
            width: 100%;
            display:inline-block;
            position:

        }

If you need more of the code or more information, please be sure to let me know.

Upvotes: 0

Views: 85

Answers (3)

Rohit Azad Malik
Rohit Azad Malik

Reputation: 32182

Hi now you can do this easily as like this

html

    <div id="footer">

          <p><b>Copyright 2011 Hometown Bank, Inc.</b> <a href="google.com">Privacy Policy</a></p>

</div>

Demo Live

Upvotes: 1

Izaias
Izaias

Reputation: 389

You can do it pretty easily by coding this way

Upvotes: 0

calvinf
calvinf

Reputation: 3924

<p> will have padding/margin and is display:block by default. Therefore, the link would appear on a new line. Change the <p> to a <span> instead and update your styles as needed.

<div id="footer">
      <span style="font-weight:bold">Copyright 2011 Hometown Bank, Inc.</span>
      <a href="http://example.com/">Privacy Policy</a>
</div>

Upvotes: 0

Related Questions