Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[疑难] 求救 一行三列 CSS 样式怎么写

[复制链接]
yuhudie2199 发表于 2008-12-31 10:57:15 | 显示全部楼层 |阅读模式
本帖最后由 yuhudie2199 于 2009-1-1 22:03 编辑

一行二列的 CSS 如下:文件/css/style.css
  1. /*单行两列信息列表*/
  2. .list2col { margin: 0; padding: 10px 0; list-style: none; line-height: 1.8em;  }
  3. /*\*/ * html .list2col { height: 1%; } /**/ *>.list2col { overflow: hidden; }
  4. .list2col li { height: 1.8em; overflow: hidden; background: url(../images/list_icon.gif) no-repeat 3px 7px; float: left;

  5. display: inline; margin: 0 5px; padding-left: 10px; width: 328px;}
  6. .mainarea .list2col { font-size:14px;}
复制代码
应用 如图 单行双列时 右边空了一 列
回复

使用道具 举报

 楼主| yuhudie2199 发表于 2008-12-31 11:25:15 | 显示全部楼层
在线等高手
回复

使用道具 举报

馨不在焉 发表于 2008-12-31 13:49:33 | 显示全部楼层
直接3个DIV 然后, 左右浮动
回复

使用道具 举报

 楼主| yuhudie2199 发表于 2009-1-1 21:59:42 | 显示全部楼层
这不是 DIV的哟
回复

使用道具 举报

Lzhou 发表于 2009-1-2 14:32:47 | 显示全部楼层
width: 328px;改变长度为(总长度 - 5x2x3 - 10x3)/3 应该就可以了

5是margin:0 5px 中的值,10为padding-left: 10px; 中的值

x 代表乘,而/代表除
回复

使用道具 举报

alleviate 发表于 2009-1-2 16:44:00 | 显示全部楼层
div很简单啊............
回复

使用道具 举报

xiaoqunfei123 发表于 2009-1-2 19:39:40 | 显示全部楼层
帮顶 下((em:08))
回复

使用道具 举报

caowa 发表于 2009-1-2 20:00:51 | 显示全部楼层
((em:01)) ding yige ha
回复

使用道具 举报

 楼主| yuhudie2199 发表于 2009-1-4 15:53:59 | 显示全部楼层
width: 328px;改变长度为(总长度 - 5x2x3 - 10x3)/3 应该就可以了

5是margin:0 5px 中的值,10为padding-left: 10px; 中的值

x 代表乘,而/代表除
Lzhou 发表于 2009-1-2 14:32


太谢谢你了 我搞定了
回复

使用道具 举报

Salty 发表于 2009-1-6 21:45:13 | 显示全部楼层
9# yuhudie2199
把写好的帖出来吧,可能有人用得着的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-10-23 22:11 , Processed in 0.112786 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表