How to style an anchor tag to look like a button with the same height as the button?

前端 未结 2 1504
南笙
南笙 2020-12-14 07:47

I am working on changing the buttons on my site to be styled by a jquery ui theme. Mostly everything is going good with it.

But there are a few anchor tags that I w

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-14 08:10

    border and align are deprecated attributes, or at least these are about presentation, not content and as such should be done in CSS, not in the HTML code:

    .mine-button {
      border: 0;
      vertical-align: bottom/middle/top/whatever;
    }
    

    Also, alt is a mandatory attribute of the img element. Can be empty (alt="" for fancy though meaningless images) or meaningful (if image conveys information not already present in text)

提交回复
热议问题