View Full Version : align text next to text?
ModernRevolutions
02-21-2009, 01:20 AM
I want to align text like this (http://preciselyts.shimmy-lyts.com/) 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 (http://www.vivid-avenue.net).
Snookerman
02-21-2009, 08:38 AM
That person did it with tables, which is yucky :rolleyes:
This is a more semantic way to do it:
<!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!
ModernRevolutions
02-21-2009, 07:06 PM
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?
Snookerman
02-21-2009, 07:10 PM
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!
ModernRevolutions
02-21-2009, 07:52 PM
got it thanks :)
Snookerman
02-21-2009, 07:58 PM
You're welcome, glad to help!
Good luck with the site!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.