使文字“bbb”在图标旁边,不要拼合在一起 [英] Make the text "bbb" to be beside to the icon, not flatten together

查看:103
本文介绍了使文字“bbb”在图标旁边,不要拼合在一起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标:

将字母bbb设置为可见,并且文本应该放在图标旁边



问题:

我试图将文本移到右侧,但它不起作用。你们知道怎么做吗?



JSfiddle

谢谢!

你可以增加左边的填充。小提琴: https://jsfiddle.net/5f7qjLgf/2/

  li.ttt a 
{
padding:1px 40px 1px 20px;
.....
}


Goal:
Make the letter "bbb" to be visible and the text should be beside to the icon

Problem:
I tried to move the text to the right side but it doesn't work. Do you guys know how to do it?

JSfiddle

Thanks!

#result-filters {
    margin: 20px, 20px, 30px;
}
#result-filters UL {
    display: inline;
    list-style: outside none none;
    margin: 0;
    padding: 0;
    font-size: 12px;
    font-family: arial, helvetica, sans-serif;
}

#result-filters UL LI {
    margin: 0 8px 0 0;
    float: left;
}


LI.filtered A {
    position: relative;
    padding: 1px 20px 1px 4px;
    background: #F0F0FF url(https://cdn3.iconfinder.com/data/icons/luchesa-vol-9/128/Lollipop-16.png) no-repeat scroll right 0;
    background-position: right bottom;
    font-weight: 400;
    color: #08C;
    text-decoration: none;
}

LI.filtered, #result-filters LI.filtered {
    padding-left: 0;
    background: transparent none repeat scroll 0 0;
}

li.ttt a
{
    position: relative;
    padding: 1px 40px 1px 4px;
    background: #F0F0FF url(https://cdn3.iconfinder.com/data/icons/luchesa-vol-9/128/Lollipop-16.png) no-repeat scroll left 0;
    background-position: left;
    font-weight: 400;
    color: #08C;
    text-decoration: none;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    background-color: #F4F4F4;       
    font-size: 18px;
}

<div id="result-filters">
    <ul>
        <li class="filtered"><a href="">
		aaa
		</a>

        </li>
        <li class="ttt"><a href="">     bbb</a>
        </li>
    </ul>
</div>

解决方案

You can just increase the left padding. Fiddle: https://jsfiddle.net/5f7qjLgf/2/

li.ttt a
{
    padding: 1px 40px 1px 20px;
    .....
}

这篇关于使文字“bbb”在图标旁边,不要拼合在一起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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