zoukankan      html  css  js  c++  java
  • IE6 7BUG 文本对齐

    BUG描述

    设置了对齐方式text-align后,正常浏览器只有文本受影响,而IE6 7会影响到内层其他元素

    BUG

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <meta name="robots" content="noindex">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Disappearing List Background Bug Demo - hasLayout.net by Zoffix Znet</title>
    
    <style type="text/css">
    
    body {
        background: #fff;
        color: #000;
    }
    #container1 { text-align: center;
                background: #0000FF;
    
     }
    
    #container2 { text-align: right;
                background: #00ffFF;
    
     }
        .inner { width: 10em;
                background: #FF00FF;
        }
    </style>
    <div id="container1">
        Give me the aligns!
        <div class="inner">Oh noes!</div>
    </div>
    
    <div id="container2">
        Give me the aligns!
        <div class="inner">Oh noes!</div>
    </div>

    解决

    改善文档结构,添加语义标签,应用FLOAT,上文中给文字段落加上标签<P>,给<P>应用FLOAT:LEFT/RIGHT

  • 相关阅读:
    分类汇总统计mysql数据库一个字段中不同的记录的总和
    golang 基础知识4
    golang 基础知识3
    golang 基础知识2
    golang 基础知识1
    mysql 锁
    node child_process
    go get下载被墙的包
    mac 修改root的密码
    ali
  • 原文地址:https://www.cnblogs.com/amws/p/3142484.html
Copyright © 2011-2022 走看看