Setting a width and height on an A tag

Luke picture Luke · Jan 20, 2011 · Viewed 157.5k times · Source

Is it possible to set the width and height in pixels on an anchor tag? I'd like to have the anchor tag to have a background image while retaining the text inside the anchor.

Answer

Jared picture Jared · Jan 20, 2011

You need to make your anchor display: block or display: inline-block; and then it will accept the width and height values.