php - 为什么 'float' 属性在 IE7 上不起作用?

标签 php html css internet-explorer-7

PHP

$activities = mysql_query('SELECT icon FROM mdl_activity');
foreach($activities as $a)
{   
  $icon = $a->icon;
  <div class="mod-indent">'.$icon.'</div>
}

$icon 是来自数据库的图像。

CSS 代码

.mod-indent { border:0px solid blue; float:left; min-width:65px; padding:23px 4px 10px; text-align:center; color:#8A4C25; font-family:TW Cen MT;
          font-size:15px; }

为什么 float:left 属性在 IE 7 中不起作用?

最佳答案

尝试在 css 代码中使用 Display: block;

关于php - 为什么 'float' 属性在 IE7 上不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8507166/

相关文章:

php - Kendo 自动完成搜索多列

php - 先到先得 php

php - 从 <option> 中选择多个字段并将它们添加到数据库

html - 将 DIV 彼此对齐并在 HTML 中添加水平滚动条

javascript - offsetWidth在不同浏览器中不一样

html - 使按钮 "Search"可点击 HTML/CSS

php - 将 PHP 和 MySQL 创建的 CSV 保存到服务器

javascript - 使用 jQuery 改变 div 的颜色

html - 如何添加这个效果

html - CSS 定位 - 使用平铺背景自动填充 div 元素的两侧