我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

修复了yii中cgridview中的Size列

enter image description here

In here, the remarks column became as big as the data is.But if the data is big like this, i want to show a few characters here, maybe 20 characters; so that the column wont get big like this.In other words, how to make a fixed size column that wont get bigger with the data?

You can either set a max width for all table cells:

.grid-view table td {
    max-width: 150px;
    overflow: hidden;
}

Or force break/wrap:

.grid-view table td {
    word-break: break-all;
}

近期文章

  • SQL下拉选择显示到PHP表中,标题仅在顶部
  • PHP合并图像(白色=透明度)
  • PHP从图像URL获取文件扩展名未以.ext结尾
  • 如何在php胡子引擎中获取模板源代码
  • 如果查询字符串存在WORDPRESS,则htaccess允许访问(禁用授权)
  • 从一个数据库读取数据并使用PHP插入另一个数据库时出现编码错误
  • 在两个不同的控制器上使用相同的功能
  • 使用xpath和php从html页面检索数据
  • 简单的MYSQL查询后无法访问用户的名字
  • 按创建时间排序数据库表
  • 单链表查找运算报SIGSEGV错误?
  • 会话和Cookie安全
  • 选择所有复选框不起作用
  • MySQL Days Subtraction在月末无效
  • PHP:在嵌套的foreach中访问父键[关闭]
  • PHP curl表单没有动作和js事件
  • 在ZF2中使用字符串替换的多个翻译
  • 五位数计数器
  • PHP无法从特定DOM元素检索值[重复]
  • curl命令到php

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华