高手指教:css布局页面使用JS调用ASP文章怎么就不能对齐?
以下是代码:
<style type="text/css">
.fangchan{clear:both}
.fangchan .pic{
background:none;
text-align: left;
list-style-type: none;
}
.fangchan thead th{padding:6px 10px 10px 10px; background:url(../images/title_2.gif) repeat-x; font-weight:normal; color:#111}
.fangchan thead .th2{text-align:left}
.fangchan tbody tr{background-image:url(../images/line_1.gif); background-position:left bottom; background-repeat:repeat-x}
.fangchan tbody .cc{background-color:#f5f5f5}
.fangchan tbody th{text-align:left; font-weight:normal; padding:8px 10px; width:330px}
.fangchan tbody td{text-align:center;padding:8px 10px;color:#444}
.fangchan tbody .cat{text-align:right; width:85px}
.fangchan tbody .cat a{color:#db3e00}
.fangchan tbody td em{color:#aaa}
.fangchan tfoot td{padding:10px 20px; text-align:right}
.fangchan tfoot td a{ text-decoration:underline}
</style>
<div class="box fangchan">
<div class="title">
<h3><a href="type.asp?name=房产信息&city=<%=request("city")%>" target="_blank" title="进入房产信息频道">房产信息</a></h3>
<ul>
<li style="background:none"><a href="type.asp?name=房产信息&city=<%=request("city")%>" target="_blank">更多>></a></li>
</ul>
</div>
<div class="content">
<div class="pic">
<!--代码开始-->
<script language='JavaScript' type='text/JavaScript' src='fangchan.asp ClassID=5></script>
<!--代码结束-->
</div>
</div>
想要的效果是对齐显示标题列表,不知道怎么,就是居中显示,本人刚学不懂的太多了,请高手教教我!
追问:不管用,真头疼,是什么地方出问题呢?可以用的,只是我目前就是引用出来的没规则的排列,我感觉是CSS问题,只是找不出CSS解决方法
答案:加个body{ text-align:left} 试试
其他:<script language='JavaScript' type='text/JavaScript' src='fangchan.asp ClassID=5></script>
js 不能引用 asp 文件吧 ?
上一个:html中CSS常用的的一些属性有哪些
下一个:HTML的学习方法,怎样下手才能自学的比较快?