DIV 里怎么让两段文字在同一行分别居左和居右?

来源:百度知道 编辑:UC知道 时间:2024/05/29 09:42:02
DIV 里怎么让两段文字在同一行分别居左和居右?如下面的文字:

·西部测图工程专家咨询委员会举行2008年度会议 2009-1-7

我想让日期靠在DIV容器的右边,新闻标题靠容器的左边~中间是空的~怎么实现?

实现的方法很多,其中一种 你看看

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{margin:0;padding:0;font-size:12px;}
.box{ width:500px; height:30px;}
h3{height:30px;line-height:30px;padding-left:10px;border-bottom:1px #999 solid; position:relative; overflow:hidden;}
h3 b{display:block; position:absolute;top:0;right:0;left:300px;width:60px;height:30px;line-height:30px;color:#000}
</style>
</head>