开发者

display icon to left of text

In our html we have:

<div id="error2"></div>

This displays dynamic error message.

In the css I have:

#error2 {
    background:url(../images/cross.png) left center no-repeat;
    color: #ff2217;
    font-size:16px;
    font-weight:bold;
    position:absolute;
    top:175px;
    left:32px;
}

What I get is:

display icon to left of text

What I want is:

开发者_运维问答

display icon to left of text


Try adding some padding:

#error2 {
padding-left: 30px;
}


Use padding-left:; like this: http://jsfiddle.net/8DnTa/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜