Ask Your Question
0

Can we convert the tag background into CSS?

asked 2011-07-28 03:16:47 -0600

NoahY gravatar image

updated 2011-07-28 03:17:38 -0600

I've worked out CSS code for the tags:

<div style="float: left; display: inline-block; height:16px;background-color:#FAFAFA;border-radius:8px 0 0 8px; position:relative; padding-right:6px; border-right: 1px #CCCCCC solid; border-bottom: 1px #CCCCCC solid; border-top: 1px #EEEEEE solid; border-left: 1px #EEEEEE solid; ">
    <div style="border: 1px #CCCCCC solid; border-radius:6px;margin:5px;position:absolute; width:5px;height:5px; background-color:white"></div>
    <span style="font-size: 11px;margin-left:16px; vertical-align:center;white-space: nowrap;line-height: 18px; color:#333333">test tag</span>
</div>

that gives an output almost exactly like the tags as they are, only it is now fully customizable via custom css.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-07-28 09:08:32 -0600

Evgeny gravatar image

But the tags are fully customizable right now too - just override the existing css rules. The tags are rendered fully via css.

There is one specific need answered by the current tag HTML - support "sliding doors" technique to use with the background images as some people will sure want to use background images.

Also, in some web-browsers rounded css corners are not supported.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-07-28 03:16:47 -0600

Seen: 71 times

Last updated: Jul 28 '11