PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

小白问题,模型排版问题求助 [复制链接]

1#
文章模块模型,我定义了如下样式
.lzy2{overflow:hidden;}
.lzy2 li{clear:both;height:20px;line-height:20px;padding:0px 0 2px 0px;text-align:left;overflow:hidden;*width:100%;*float:left;}
.lzy2 .title{float:left;text-align:left;padding:0 0 0 100px;background:url(images/111.gif) no-repeat left 4px;}
.lzy2 .date{float:right;color666666;padding-right:2px}
.lzy2 table td{text-align:center}
.lzy2 table td img{border:1px solid #ececec;margin:5px 5px 5px 5px;}

显示如下:




如何修改让文章标题靠向左边小图标处????
分享 转发
TOP
2#

感谢大神出手

感谢大神出手,我把padding:0 0 0 100px;  改成padding:0 0 0 10px;后文章标题更靠右了啊!如图


TOP
3#

说明一下我是用表格来左右布局的!
这下连文章图标也移到右侧去了啊!
TOP
4#

文章类模块模型代码:
<div class="lzy2">
  <ul>
<%
DataTable dt;
DataRow dr;
dt=Get_Data();
for(int i=0;i<dt.Rows.Count;i++)
{
dr=dt.Rows;
%>
   <li><span class="title">
<a href="<%=Detail_Url(dr)%>" target="<%=Target%>" title="<%=Server.HtmlEncode(dr["title"].ToString())%>" style="<%=dr["pa_style"]%>"><%=SubStr(dr["title"].ToString(),Title_Num,true)%></a></span>
<span class="date"><%=((DateTime)dr["thedate"]).ToString("yyyy-MM-dd")%></span>
<span class="clear"></span>
   </li><%}%>
  </ul>
</div>

样式定义
.lzy2{overflow:hidden;}
.lzy2 li{clear:both;height:20px;line-height:20px;padding:0px 0 2px 0px;text-align:left;overflow:hidden;*width:100%;*float:left;}
.lzy2 .title{float:left;text-align:left;padding:0 0 0 10px;background:url(images/111.gif) no-repeat left 4px;}
.lzy2 .date{float:right;color666666;padding-right:2px}
.lzy2 table td{text-align:center}
.lzy2 table td img{border:1px solid #ececec;margin:5px 5px 5px 5px;}

模块具体设置:
<table width="100%" border="0">
  <tr>
    <td><script src="/e/aspx/slide.aspx?id=7" type="text/javascript"></script></td>
    <td width="10">&nbsp;</td>
    <td width="50%">{paodel}1,132,579,,0,,_self,10,50,80,50{/paodel}</td>
  </tr>
  <tr>
     <td colspan="3">{paodel}1,43,579,,0,,_self,12,100,150,100{/paodel}</td>
  </tr>
  <tr>
    <td colspan="3"><img width="575" height="58" title="" align="" alt="" src="/e/images/index_xyxw.jpg" /></td>
  </tr>
  <tr>
    <td colspan="3"><img width="575" height="174" title="" align="" alt="" src="/e/images/xf.jpg" /></td>
  </tr>
</table>


模块靠左60%
TOP
5#

别沉啊!
TOP
6#

好了!

[b]回复 [url=http://bbs.pageadmin.net/showtopic-35228.aspx#134528]6楼[color=olive]xiyou[/color]的帖子[/url][/b]

终于好了,width="50%改成width=400px
TOP
发新话题 回复该主题