Previous Message
Next Message

Re: [css-d] Is left and right justification of text on one line possiblein CSS?

Sent by Nik Schramm on 28 August 2002 00:12


On 28.Aug.02 01:14 Webapprentice wrote

> I am wondering if it possible to do the following in CSS, without using 
> pixel positioning (declaring pixel coordinates)
> 
> Text A                   Text B
> ---------------------------

Stephen

try this:

<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title> Left Right </title>
		<style type="text/css">
			<!--
			.line { border-bottom: 1px solid black; }
			.right { width: 50%; float:right; text-align: right; }
			//-->
		</style>
	</head>
	<body>
		<div class="line">
			<span class="right">This is on the right</span>
			This is on the left
		</div>
	</body>
</html>

Hope it helps...


-- 
/nik
Previous Message
Next Message