Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 表格单元格中的内联CSS元素溢出_Javascript_Html_Css Tables - Fatal编程技术网

Javascript 表格单元格中的内联CSS元素溢出

Javascript 表格单元格中的内联CSS元素溢出,javascript,html,css-tables,Javascript,Html,Css Tables,我创建了一个脚本,可以动态插入表中包含内容的表行。问题是,我使用了和 插入的动态HTML(示例): 我在firebug上查过了。删除空白:nowrap用于td.title.章节列表和td.title.章节列表a 加上这个 td.title .chapter-list, td.title .chapter-list a { white-space: normal; } 您的样式空白:nowrap强制行不换行,这会导致溢出。实际上,删除空白规则完全解决了问题,谢谢!出于好奇,为什么需要添加空白:正

我创建了一个脚本,可以动态插入表中包含内容的表行。问题是,我使用了

插入的动态HTML(示例):


我在firebug上查过了。删除
空白:nowrap用于
td.title.章节列表
td.title.章节列表a
加上这个

td.title .chapter-list,
td.title .chapter-list a
{
white-space: normal;
}

您的样式
空白:nowrap
强制行不换行,这会导致溢出。实际上,删除
空白
规则完全解决了问题,谢谢!出于好奇,为什么需要添加
空白:正常如果删除
nowrap
属性?如果你移除它,它应该默认为正常。你是对的@TracyFu,我只是担心它会从其他类继承一些规则。谢谢。我很感激。:)
td.title .chapter-list {
    list-style:none;
    padding:0;
    margin:0;
    font-variant: small-caps;
    white-space: nowrap;
    padding-right:0;
}
td.title .chapter-list:before { content: "(fejezetek: "  }
td.title .chapter-list:after { content: ")"  }
td.title .chapter-list a {
    white-space: nowrap;
    margin:0px 3px;
    padding-bottom:0;
}
td.title .chapter-list a:after { content:", " }
td.title .chapter-list a:last-child:after { content: "" !important }
td.title .chapter-list,
td.title .chapter-list a
{
white-space: normal;
}