Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2013
    Location
    Australia
    Posts
    118
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Float text left and right side of page in same line.

    Hello I am trying to get text to float left and right in one line.

    HTML Code


    <div id="subfooter">

    <div id="sfooter">
    <ul class="left">
    <p>Your Store &copy; 2013</p>
    <li>All Rights Reserved <a href="#">Privacy</a> Privacy Statement</li>
    </ul>

    <div class="clear"></div>

    <div id="sfooter">
    <ul class="right">
    <li><a href="#">Home</a></li>
    <li><a href="#">My Account</a></li>
    <li><a href="#">View Cart</a></li>
    <li><a href="#">Checkout</a></li>
    </ul>
    </div>


    </div><!--Sub Footer End Div-->

    CSS Code

    #subfooter {
    width: 100%;
    background: black;
    min-height: 40px;
    }
    #sfooter {
    color: #ffffff;
    width: 980px;
    margin: 0 auto;
    min-height: 40px;
    }
    #sfooter .left ul {
    float: left;
    clear: both;
    }
    #sfooter .left li {
    margin: 0px;
    padding: 0px;
    list-style: none;
    }
    #sfooter .left a {
    text-decoration: none;
    }
    .clear {
    clear: both;
    }
    #sfooter .right ul {
    clear: both;
    }
    #sfooter .right li {
    float: right;
    margin: 0px;
    padding: 0px;
    list-style: none;
    display: inline;
    text-align: right;
    }
    #sfooter .right a {
    margin-left: 20px;
    color: #ffffff;
    text-decoration: none;
    }
    #sfooter .right ul {
    float: right;
    }

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,030
    Thanks
    23
    Thanked 589 Times in 588 Posts
    Quote Originally Posted by vipercode View Post
    Hello I am trying to get text to float left and right in one line.
    You can't get text to float left AND right. What are you trying to do? What line are you talking about?

    You wrapped your code in a quote, use the hash [#] to the right of it to display code.
    Evolution - The non-random survival of random variants.

  • #3
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    396
    Thanks
    2
    Thanked 30 Times in 30 Posts
    That mess makes absolutely no sense when compared to the text describing what you are trying to do. You have no where near a correct structure for spit floats.

    Post a link to the page, because the code you posted is not going to help much.
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •