0

I am trying to setup a system of nested DIV tags and I get a strange problem. When loaded in the browser (Tested in Safari, Chrome & FF on OS X) the two innermost divs are rendered inside one another.

See this fiddle: http://jsfiddle.net/m48wG/

The DIVs in question are the lightest gray ones, with the class "l4". In the sourcecode they look like this:

<div class="box box-horizontal l4" style="width:100px;height:100px;"></dix>
<div class="box box-horizontal l4" style="width:100px;height:100px;margin-left:3px;"></dix> 

But inspecting the elements in the browser inspectors gives this:

<div class="box box-horizontal l4" style="width:100px;height:100px;">
   <div class="box box-horizontal l4" style="width:100px;height:100px;margin-left:3px;"></dix>
</dix>  

Any ideas what is causing this and how it can be fixed?

Thanks

EDIT: HAHA.. Sorry, my bad! Thank you guys, I totally didn't see that one.. Might need to go see an eyedoctor ;)

4

3 回答 3

1

正确</dix></div>你应该没问题

如果您没有立即看到它,请更改

<div class="box box-horizontal l4" style="width:100px;height:100px;"></dix>

<div class="box box-horizontal l4" style="width:100px;height:100px;"></div>

以及其他不正确的 div 也是如此。

于 2013-07-16T14:02:03.540 回答
1
<body>
<h1>Jeg er test</h1>
<div class="row l1">
  <div class="box box-horizontal l2" style="width:200px;height:200px;"></div>
  <div class="box box-horizontal box-auto l2" style="margin-left:3px;">
   <div class="box box-vertical l3" style="width:200px;height:100px;"></div>
   <div class="box box-vertical box-auto l3" style="margin-top:3px;">
     <div class="box box-horizontal l4" style="width:100px;height:100px;"> </div>
     <div class="box box-horizontal l4" style="width:100px;height:100px;margin-left:3px;"> </div>
    </div>
  </div>
</div>
</div>
</div>
</body>
于 2013-07-16T14:06:37.980 回答
0

这只是结束标签中的错字。 </dix>应该</div>

于 2013-07-16T14:00:43.727 回答