2011-09-05 47 views
0

图像胜过千言万语,所以这里是一个:表格单元不能在IE中工作,有什么想法?

enter image description here

上的图像是corect版本,我使用的显示:表单元格,以避免在IE7第二图像中会发生什么。你建议用什么来避免这种情况?

下面是使用的代码:

<div class="sharerDataContainer"> 

    <img src="http://tctechcrunch2011.files.wordpress.com/2011/09/perfectworld.png?w=145" width="90" alt="Andrew" /> 

    <div class="sharerData"> 

       <p class="sharerDataTitle"> 
           <a href="http://example.org" target="_blank"> 
               Website Title Here 
           </a> 
       </p> 


       <p class="sharerDataAddress"> 
           mbac.squarespace.com 
       </p> 


       <p class="sharerDataDescription"> 
         Congratulations to Rachel Edwards, who won a fabulous Bloom Tea Treatment Box Set (worth £20) from our friends at Running Cupcake 
       </p> 

    </div> 

    </div> 

UPDATE:

CSS代码:

.sharerDataContainer img { 
    float: left; 
} 

.sharerData { 
    background: none repeat scroll 0 0 transparent; 
    border: 0 solid #0077A5; 
    color: #808080; 
    display: table-cell; 
    font-size: 11px; 
    line-height: 15px; 
    padding: 0 10px !important; 
    position: relative; 
} 

.sharerData .sharerDataDescription { 
    margin-top: 5px; 
} 
+0

我们可以看看你的css吗? – Tsar

+0

你的问题很混乱。你问为什么'display:table-cell'在IE7中不起作用?你在问如何让它看起来像所有浏览器中的第一个截图? – thirtydot

+0

@Tsar完全添加了CSS代码 – Andrew

回答

1

简单的跨浏览器的解决方案是包裹图像中的另一个div ision标签:

<div class="imgContainer"> 
    <img src="" width="90" alt="Andrew" /> 
</div> 

,并让它浮动:

.sharerDataContainer .imgContainer { 
    float: left; 
} 

尝试一下! http://jsfiddle.net/9U7e9/

+0

是的,谢谢。这也适用:) – Andrew

+0

@Tsar:只是为了您的信息,这不太现实。在IE7中检查它:http://jsfiddle.net/9U7e9/1/(我只是添加了一些额外的文本) – thirtydot

相关问题