CSS漏洞从div溢出

时间:2012-05-13 15:49:57

标签: css

导航到客户端页面,您应该看到链接和电子邮件地址溢出其包含的div标签,因为类'client'例如:

<div class="client">
<span class="delete">
<span class="name">
<span class="address">
<span class="municipal">
<span class="county">
<span class="phone">
<p class="email">
<span class="url">
<strong>www:</strong>
<a href="http://www.edjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjju.salford.ac.uk">
</span>
</div>

无论如何要防止电子邮件和网站的span元素内的文本字符串离开div使其在下面的新行上运行?解决方案需要有序,因此页面可以通过W3C验证CSS。

1 个答案:

答案 0 :(得分:2)

这样写:

a{
 word-wrap:break-word;
}