开发者

Styling part of a (submit) button-label

I have a submit button which is simply marked up as this:

<input type='submit' name='foo' value='Continue ⇢' class='button' />

Styling part of a (submit) button-label

I would like to make the rightward dotted arrow a tad larger.

<input type='submit' name='foo' value='Continue <span class='makemeatadlarger'>⇢</span>' class='button' />

is obviously not working... Is there a simple way to do this (I am not interested in adding tons of outher divs/spans and preferable without having to use images)

UPDATE Inspired by accepted answer below I came up with this:

html

<button type='submit' name='foo' value='Continue' class='button'>Continue</button>

css

.button:after  {
    content: ' ⇢';
    font-size: 220%;
    height: 26px;
    margin-top: -19px;  
    float: right;
}

example

Styling part of a (submit) button-label

And heres a live example over at jsf开发者_开发问答iddle


I don't believe so because taking the span out takes it out of the button. The best way would be a button instead of an input like so: <button type="submit" name="foo" class="button">Continue <span class='makemeatadlarger'>⇢</span></button>


You must style the button text as a whole, not just a portion. To achieve your desired effect wouldn't it be much easier to create an image?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜