产品使用及交流论坛

首页 » 产品使用交流区 » 安装及使用交流 » 小白问题,模型排版问题求助
8mn - 2016/9/19 22:45:30
文章模块模型,我定义了如下样式
.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;color:#666666;padding-right:2px}
.lzy2 table td{text-align:center}
.lzy2 table td img{border:1px solid #ececec;margin:5px 5px 5px 5px;}

显示如下:

12113


如何修改让文章标题靠向左边小图标处????
xiyou - 2016/9/20 8:49:02
padding:0 0 0 100px; 你定义了一个左内边距100px改小一点
yewill - 2016/9/20 10:57:37
我找不到模版的首页文件在哪里   你在哪里改的呀
8mn - 2016/9/20 15:30:41
感谢大神出手,我把padding:0 0 0 100px;  改成padding:0 0 0 10px;后文章标题更靠右了啊!如图


12114
8mn - 2016/9/20 15:47:28
说明一下我是用表格来左右布局的!
这下连文章图标也移到右侧去了啊!
xiyou - 2016/9/20 16:20:26
贴出整个模型代码出来,你不贴出来谁知道你这么写得
8mn - 2016/9/20 21:09:01
文章类模块模型代码:
<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;color:#666666;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%">{pa:model}1,132,579,,0,,_self,10,50,80,50{/pa:model}</td>
  </tr>
  <tr>
     <td colspan="3">{pa:model}1,43,579,,0,,_self,12,100,150,100{/pa:model}</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%
8mn - 2016/9/21 19:41:14
别沉啊!
8mn - 2016/9/22 14:20:03
[b]回复 [url=http://bbs.pageadmin.net/showtopic-35228.aspx#134528]6楼[color=olive]xiyou[/color]的帖子[/url][/b]

终于好了,width="50%改成width=400px
1
查看完整版本: 小白问题,模型排版问题求助