本站首页    管理页面    写新日志    退出


«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31


公告
================

注会练习软件
http://www.cpasoft.com.cn
我的注会软件官网

http://blog.163.com/abc7105@126/

 

 


哈哈,热爱快“过气”的DELPHI


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:注册会计师(注会)练习软件
日志总数:398
评论数量:116
留言数量:27
访问次数:3267131
建立时间:2005年6月6日




[delpih编程]asp.net中repeater控件做横向菜单方便控制
软件技术

吕向阳 发表于 2009/3/14 11:34:19

列表作横向菜单的CSS,当然一般用'<div class="">'<ul>'<li><li>'<li><li>'<li><li>..'</ul>'</div>这样做是没有一点问题的,问题是我用的是一个asp.net中repeater控件来做的,常规做法出现的问题是不出现在一行上,并且高度不能控制。此时 我用下面方法解决 主要改变做法:去掉<ul><li>相关标签,改为:CssClass="li" (asp.net对象)或class="li"(html对象)============html代码:/*<div class="test">                                                (注:这里也没有用<ul></ul>) <a href="index.aspx" class="li">回主页</a>   (注:这里没有用<li></li> <ASP:Repeater id="Repeater1" runat="server">  <itemtemplate>    <asp:HyperLink CssClass="li"  runat="server" navigateurl='<%# "typelist.aspx?RootId="+DataBinder.Eval(Container.DataItem ,"externalid") %>' target="_self"><%# DataBinder.Eval(Container.DataItem,"mc")%>    </asp:HyperLink>    </itemtemplate>    </ASP:Repeater>  <a href="newstypeadd.aspx" class="li">管理</a></div> */============css代码/*.test ul{list-style:none;width:100%;background:#CCC;height:25px;}.test li{float:left;width:100px;background:#CCC;margin-left:0px;line-height:25px;} .test a{font-size: 14px;float:left;width:100px;display:block;text-align:center;height:30px;}.test a:link{font-size: 14px;float:left;width:100px;color:#666;background:url(images\arrow_off.gif) #CCC no-repeat 5px 12px;text-decoration:none;}.test a:visited{font-size: 14px;float:left;width:100px;color:#666;text-decoration:underline;}.test a:hover{font-size: 14px;float:left;width:100px;color:#FFF; font-weight:bold;text-decoration:none;background:url(images\arrow_on.gif) #F00 no-repeat 5px 12px;}.test a:active{font-size: 14px;float:left;width:100px;color:#FFF; font-weight:bold;text-decoration:none;background:url(images\arrow_on.gif) #F00 no-repeat 5px 12px;}*/========


阅读全文(1108) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.340 second(s), page refreshed 144766909 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号