CSS: Left and right on the same line
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> .test{ background:white; border:1px solid #000; color: #000000; font-size:x-large; text-align:right; margin:20px 0; padding:10px; white-space:nowrap; } .test span{ float:left; width:5em; text-align:left; } </style> </head> <body> <p class="test"><span>left </span><img src="http://www.java2s.com/style/logo.png" width="12" height="15" alt ="arrow image" /></p> <p class="test"><span>left </span>Right</p> </body> </html>