Results 1 to 6 of 6

Thread: align text next to text?

  1. #1
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default align text next to text?

    I want to align text like this person doesn on the top right of his site. The affiliates part. I need a simple code to do it. Please and thanks.

    We are trying to do that here.
    ------------------
    Check out my site here and let me know what you think

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    That person did it with tables, which is yucky

    This is a more semantic way to do it:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <style type="text/css">
    .wrap {
    	background: #ddd;
    	overflow: hidden;
    	width: 200px;
    }
    ul {
    	list-style: none;
    	margin: 0;
    	padding: 0;
    }
    .partone {
    	float: left;
    }
    .parttwo {
    	float: right;
    	text-align: right;
    }
    </style>
    </head>
    <body>
    <div class="wrap">
    	<ul class="partone">
    		<li>One left</li>
    		<li>Two left</li>
    		<li>Three left</li>
    		<li>Four left</li>
    		<li>Five left</li>
    		<li>Six left</li>
    		<li>Seven left</li>
    	</ul>
    	<ul class="parttwo">
    		<li>One right</li>
    		<li>Two right</li>
    		<li>Three right</li>
    		<li>Four right</li>
    		<li>Five right</li>
    		<li>Six right</li>
    		<li>Seven right</li>
    	</ul>
    </div>
    </body>
    </html>
    Good luck!
    Last edited by Snookerman; 02-21-2009 at 08:45 AM. Reason: typo

  3. The Following User Says Thank You to Snookerman For This Useful Post:

    ModernRevolutions (02-21-2009)

  4. #3
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    that basically did it however is there a way to get the links that are on the right to be on the same lines as the ones on the left? You know what i mean?
    ------------------
    Check out my site here and let me know what you think

  5. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I thought they were? If you don't have the same amount of items on both sides, the simplest solution would be to use empty list tags. Or do you mean on the same line in the actual markup?

    Good luck!

  6. The Following User Says Thank You to Snookerman For This Useful Post:

    ModernRevolutions (02-21-2009)

  7. #5
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    got it thanks
    ------------------
    Check out my site here and let me know what you think

  8. #6
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You're welcome, glad to help!

    Good luck with the site!

Bookmarks

Posting Permissions

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