Css 在Firefox问题中呈现Div
我想在firefox中呈现类似的内容Css 在Firefox问题中呈现Div,css,Css,我想在firefox中呈现类似的内容 <div style="float:left"> Row1,Column1 </div> <div> Row 1,Column2 <div> Content 1 n Row1,Column2 </div> <div> Content 2 in Row1,Column2 </div> </div> 在IE中可以工作,但在firefox中呈现如下 [R
<div style="float:left"> Row1,Column1 </div>
<div>
Row 1,Column2
<div> Content 1 n Row1,Column2 </div>
<div> Content 2 in Row1,Column2 </div>
</div>
在IE中可以工作,但在firefox中呈现如下
[Row1,Column1] [Content 1 n Row1,Column2]
[Content 2 in Row1,Column2 dsfdsf sdfdsf
fsdfdsfdffsf]
这就是问题所在
我不能在这里复制css,但这就是最终的结果您可以渲染如下内容
<div style="clear:both"> Row1,Column1 </div>
<div> Row 1,Column2
<div> Content 1 n Row1,Column2 </div>
<div> Content 1 in Row1,Column2 </div>
</div>
第1行第1列
第1行第2列
内容1第1行第2列
第1行第2列中的内容1
您可以渲染如下内容
<div style="clear:both"> Row1,Column1 </div>
<div> Row 1,Column2
<div> Content 1 n Row1,Column2 </div>
<div> Content 1 in Row1,Column2 </div>
</div>
第1行第1列
第1行第2列
内容1第1行第2列
第1行第2列中的内容1
这是浮点数的工作方式(做得不对)。最简单的修复方法是将所有这些元素包装在另一个div中,然后将“浮动”元素的高度设置为100%
编辑:固定
这是花车的工作方式(做错了)。最简单的修复方法是将所有这些元素包装在另一个div中,然后将“浮动”元素的高度设置为
100%
编辑:固定
你想做的事是行不通的
如果您不能简单地使用table元素,那么您将需要为“单元格”使用固定的高度和宽度,否则您的web应用程序中的行和列将永远不会对齐
(一篇来自Alist的文章,应该对您具有权威性,请搜索“您是说HTML表已经死了吗?”)您试图做的是行不通的
如果您不能简单地使用table元素,那么您将需要为“单元格”使用固定的高度和宽度,否则您的web应用程序中的行和列将永远不会对齐
(一篇来自Alist的文章,应该对您具有权威性,请搜索“您是说HTML表已经死了吗?”)
第1行第1列
第1行第2列
第1行第2列中的内容1
第1行第2列中的内容1
第1行第1列
第1行第2列
第1行第2列中的内容1
第1行第2列中的内容1
将第二列向左浮动,并给它留一个左边距
<div style="float:left"> Row1,Column1 </div>
<div style="float:left;margin-left:100px;">
Row 1,Column2
<div> Content 1 n Row1,Column2 </div>
<div> Content 1 in Row1,Column2 </div>
</div>
第1行第1列
第1行第2列
内容1第1行第2列
第1行第2列中的内容1
将第二列向左浮动,并给它留一个左边距
<div style="float:left"> Row1,Column1 </div>
<div style="float:left;margin-left:100px;">
Row 1,Column2
<div> Content 1 n Row1,Column2 </div>
<div> Content 1 in Row1,Column2 </div>
</div>
第1行第1列
第1行第2列
内容1第1行第2列
第1行第2列中的内容1
由此产生的代码
<html>
<head>
</head>
<body>
<div style="float:left; background: red;">
Row 1 column 1
</div>
<div style="background: blue;margin-left: 200px;">
<p>Row 1 column 2</p>
<p>fdsfsfsdfsdfsdfsdfs</p>
</div>
</body>
</html>
第1行第1列
第1行第2列
FDSFSDFSDFSFDFS
由此产生的代码
<html>
<head>
</head>
<body>
<div style="float:left; background: red;">
Row 1 column 1
</div>
<div style="background: blue;margin-left: 200px;">
<p>Row 1 column 2</p>
<p>fdsfsfsdfsdfsdfsdfs</p>
</div>
</body>
</html>
第1行第1列
第1行第2列
FDSFSDFSDFSFDFS
你能用你的css发布一些html吗?你能发布一些代码和/或图表,展示你在Firefox中试图实现的目标以及它是如何崩溃的吗?在大多数情况下,错误实际上在于IE,因为它呈现了不符合要求的内容…嗯。。我希望你知道你的想法是错误的。请发布一些css?请使用正确的格式。谢谢你,秋葵。。。我真的很纠结于此。你能用你的css发布一些html吗?你能发布一些代码和/或图表,展示你在Firefox中试图实现的目标以及它是如何崩溃的吗?在大多数情况下,错误实际上在于IE,因为它呈现了不符合要求的内容…嗯。。我希望你知道你的想法是错误的。请发布一些css?请使用正确的格式。谢谢你,秋葵。。。我真的很纠结于此。你可能需要给第1行、第2列中的内部div加一个宽度,因为它们可能会将内容推出,这将导致内容落在第1行、第1列下。你可能需要给第1行、第2列中的内部div加一个宽度,因为它们可能会将内容推出,这将导致内容落在第1行、第2列下,Column1.这是我想要的,但是如果文本[第1行,第2列中的内容2 dsfdsf sdfdsfsdf SDFSDFSDSF SDFSDFSFDSF SFDSDFDFDFDFDFDFSDFSDFSFDSF]很长,它会包装并落在[第1行,第1列]文本下面。这是我想要的,但是如果文本[第1行,第2列中的内容2 DSFDSFSDFDSFSDFSDFSFDFSFDFSDF SDFSDFSFDFSFDFSFF SDFSF SDFSDFDFDFDFDFDFDFDFSF SDF]很长,它会被包装并落在[Row1,Column1 SDFSDFDFSFDFSDDFSF很长,它包裹在[Row1,Column1]文本下面。我理解,问题在于指南。他想做的事不在我手上行得通。从他向我们展示的数据来看,这是一个简单的两列布局。我知道,问题在于指导方针。他想做的事不在我手上行得通。从他向我们展示的数据来看,这是一个简单的两列布局。
<html>
<head>
</head>
<body>
<div style="float:left; background: red;">
Row 1 column 1
</div>
<div style="background: blue;margin-left: 200px;">
<p>Row 1 column 2</p>
<p>fdsfsfsdfsdfsdfsdfs</p>
</div>
</body>
</html>