在div中包含span标记 [英] Wrapping span tags inside a div

查看:304
本文介绍了在div中包含span标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个div标签互相嵌套和一些span标签嵌套如下: -

I have a couple of div tags nested withing each other and a few span tags nested like below:-

<div id="leftcol">
<div id="tagcloud">
<span class="mytags"><a href="">tag1</a></span><span class="mytags"><a href="">tag2</a> and a few more spans of the same type
</div>
</div>

现在的问题是跨度溢出他们的容器div标签。有人会很好,让我知道如何使这些跨度被包装在它们的conatiner div(这里是与id tagcloud的div).both外部div的宽度指定为300px。

Now the issue is that spans overflow their container div tag.Can somebody be kind enough to let me know how to get these spans to be wrapped inside their conatiner div (here the div with the id tagcloud).both the outer divs have a width of 300px specified.

info - 我已经做了一个CSS重置使用YUI的reset-fonts-grids。我只是习惯了CSS ..)
编辑: - 网站可以看看frekshrek.appspot.com ...标签cloud只是不在其容器内包装div

(Additional info- I have done a css reset using the YUI reset-fonts-grids. I am just getting acustomed to CSS .. ) -The site can be looked at frekshrek.appspot.com ... the tag cloud just does not wrap inside its container div

推荐答案

尝试声明 float:left; .mytagcloud 类。类似的东西:

Try declaring float: left; on the .mytagcloud class. Something like:

.mytagcloud{
    float: left;
    margin: 5px;
    font-family: 'Reenie Beanie', arial, serif;
}

basiclayout.css 文件,第71行。

这篇关于在div中包含span标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆